-
Notifications
You must be signed in to change notification settings - Fork 2.6k
WAOUN Onboarding #1004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
WAOUN Onboarding #1004
Changes from 10 commits
24e63d0
8d65340
a1f3314
2bdaaf8
8f77002
a032b7d
f2f4add
5205845
ee692d4
8ed9368
a150ae9
047a922
9734e7f
1d50e6a
6fa131b
3b6035d
2ff7967
bfee85e
d546346
9a66bbf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from . import models | ||
|
||
|
||
from odoo import api, SUPERUSER_ID | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
'name': "Real Estate", | ||
|
||
'summary': """ | ||
Real Estate Tuto" | ||
""", | ||
|
||
'description': """ | ||
Starting tutorial real estate" | ||
""", | ||
|
||
'author': "Odoo", | ||
'website': "https://www.odoo.com/", | ||
'category': 'Tutorials', | ||
'version': '0.1', | ||
'application': True, | ||
'depends': ['base'], | ||
|
||
'data': [ | ||
'security/ir.model.access.csv', | ||
'views/estate_property_views.xml', | ||
'views/estate_menus.xml', | ||
'views/estate_property_type_views.xml', | ||
|
||
], | ||
'assets': { | ||
|
||
}, | ||
'license': 'AGPL-3' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from . import estate_property | ||
from . import estate_property_type | ||
from . import buyer | ||
from . import salesperson |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class Buyer(models.Model): | ||
_name = 'buyer' | ||
_description = 'The entity to buy the estate' | ||
|
||
name = fields.Char('Buyer') |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from odoo import fields, models | ||
from dateutil.relativedelta import relativedelta | ||
|
||
|
||
class Estateproperty(models.Model): | ||
_name = "estate.property" | ||
_description = "Estate property" | ||
|
||
name = fields.Char('Title', required=True) | ||
description = fields.Text('Description', required=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The string is generated from the variable name so no need to duplicate it here |
||
postcode = fields.Char('Postcode', required=True) | ||
date_availability = fields.Date('Available From', copy=False, default=fields.Datetime.now() + relativedelta(months=3)) | ||
expected_price = fields.Float('Expected Price', required=True) | ||
selling_price = fields.Float('Selling Price', readonly=True, copy=False) | ||
bedrooms = fields.Integer('Bedrooms', default=2) | ||
living_area = fields.Integer('Living Area (sqm)') | ||
facades = fields.Integer('Facades') | ||
garage = fields.Boolean('Garage') | ||
garden = fields.Boolean('Garden') | ||
garden_area = fields.Integer('Garden area (sqm)') | ||
garden_orientation = fields.Selection( | ||
string='Garden Orientation', | ||
selection=[('north', 'North'), ('south', 'South'), ('west', 'West'), ('east', 'East')], | ||
) | ||
active = fields.Boolean('Active', default=True) | ||
state = fields.Selection( | ||
string='State', | ||
selection=[('new', 'New'), ('offer received', 'Offer Received'), ('offer accepted', 'Offer Accepted'), ('sold', 'Sold'), ('cancelled', 'Cancelled')], | ||
help="Estate state", | ||
default=('new') | ||
) | ||
property_type_id = fields.Many2one("estate.property.type", string="Type") | ||
salesperson = fields.Many2one('salesperson', string='Salesperson') | ||
buyer = fields.Many2one('buyer', string='Buyer') |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class EstatePropertyType(models.Model): | ||
_name = "estate.property.type" | ||
_description = "Estate Property Type" | ||
|
||
name = fields.Char('Type', required=True) | ||
description = fields.Text('Description') | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class Salesperson(models.Model): | ||
_name = 'salesperson' | ||
_description = 'The individual handling the sales for the estate' | ||
|
||
name = fields.Char('Salesperson') |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink | ||
access_estate_property,estate.property,model_estate_property,base.group_user,1,1,1,1 | ||
access_estate_property_type,estate.property.type,model_estate_property_type,base.group_user,1,1,1,1 | ||
access_buyer,buyer,model_buyer,base.group_user,1,1,1,1 | ||
access_salesperson,sales,model_salesperson,base.group_user,1,1,1,1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<menuitem id="estate_menu_root" name="Real Estate"> | ||
<menuitem id="estate_first_level_menu" name="Advertisements"> | ||
<menuitem id="estate_model_menu_action" action="estate_property_model_action"/> | ||
</menuitem> | ||
<menuitem id="estate_type_first_level_menu" name="Settings"> | ||
<menuitem id="estate_type_model_menu_action" action="estate_property_type_model_action"/> | ||
</menuitem> | ||
</menuitem> | ||
</odoo> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
|
||
<record id="estate_property_type_model_action" model="ir.actions.act_window"> | ||
<field name="name">Property Types</field> | ||
<field name="res_model">estate.property.type</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
|
||
</odoo> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="estate_property_model_action" model="ir.actions.act_window"> | ||
<field name="name">Properties</field> | ||
<field name="res_model">estate.property</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
|
||
<record id="estate_property_view_search" model="ir.ui.view"> | ||
<field name="name">estate.property.view.search</field> | ||
<field name="model">estate.property</field> | ||
<field name="arch" type="xml"> | ||
<search string="property"> | ||
<field name="name" string="Title"/> | ||
<field name="postcode"/> | ||
<field name="expected_price"/> | ||
<field name="bedrooms"/> | ||
<field name="living_area"/> | ||
<field name="facades"/> | ||
<filter string="Available" name="available properties" domain="[ ('state', 'in', ['new', 'offer received']) ]"/> | ||
<filter string="Postcode" name="postcode" context="{'group_by':'postcode', 'residual_visible':True}"/> | ||
</search> | ||
</field> | ||
</record> | ||
|
||
<record id="estate_property_view_list" model="ir.ui.view"> | ||
<field name="name">estate.property.list</field> | ||
<field name="model">estate.property</field> | ||
<field name="arch" type="xml"> | ||
<list string="Channel"> | ||
<field name="name"/> | ||
<field name="postcode"/> | ||
<field name="bedrooms"/> | ||
<field name="living_area"/> | ||
<field name="expected_price"/> | ||
<field name="selling_price"/> | ||
<field name="date_availability"/> | ||
</list> | ||
</field> | ||
</record> | ||
|
||
<record id="estate_property_view_form" model="ir.ui.view"> | ||
<field name="name">estate.property.form</field> | ||
<field name="model">estate.property</field> | ||
<field name="arch" type="xml"> | ||
<form string="property"> | ||
<sheet> | ||
<group> | ||
<h1> | ||
<field name="name"/> | ||
</h1> | ||
</group> | ||
<group> | ||
<group> | ||
<field name="postcode"/> | ||
<field name="date_availability"/> | ||
</group> | ||
<group> | ||
<field name="expected_price"/> | ||
<field name="selling_price"/> | ||
</group> | ||
</group> | ||
<notebook> | ||
<page string="Description"> | ||
<group> | ||
<field name="description"/> | ||
<field name="bedrooms"/> | ||
<field name="living_area"/> | ||
<field name="facades"/> | ||
<field name="garage"/> | ||
<field name="garden"/> | ||
<field name="garden_area"/> | ||
<field name="garden_orientation"/> | ||
</group> | ||
</page> | ||
<page string="Other Info"> | ||
<group> | ||
<field name="salesperson"/> | ||
<field name="buyer"/> | ||
</group> | ||
</page> | ||
</notebook> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
|
||
</odoo> | ||
|
Uh oh!
There was an error while loading. Please reload this page.