-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
plha #228
base: 18.0
Are you sure you want to change the base?
plha #228
Changes from 6 commits
0df9ae8
3c8218b
96643d5
455e8d9
686616c
46ce22f
d219fa8
837033e
10fcaec
08f0d77
7b04592
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,3 @@ | ||
{ | ||
"python.languageServer": "None" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ 'name': 'real estate app plh', | ||
'depends': [ | ||
'base',], | ||
'application': True, | ||
'data':[ | ||
'security/ir.model.access.csv', | ||
'views/estate_property_views_action.xml', | ||
'views/estate_menus.xml', | ||
'views/estate_list_view.xml', | ||
'views/estate_form_view.xml', | ||
'views/estate_search_view.xml', | ||
'views/type_actions.xml', | ||
'views/type_menus.xml', | ||
'views/type_views.xml', | ||
'views/tag_actions.xml', | ||
'views/tag_menus.xml', | ||
'views/tag_views.xml', | ||
# 'views/offer_actions.xml', | ||
# 'views/offer_menus.xml', | ||
'views/offer_views.xml', | ||
|
||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from . import estate_property | ||
from . import property_type | ||
from . import property_tag | ||
from . import property_offer |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,27 @@ | ||||||||||||||||||
from odoo import fields, models | ||||||||||||||||||
from datetime import date, timedelta | ||||||||||||||||||
|
||||||||||||||||||
class EstateProperty(models.Model): | ||||||||||||||||||
_name = "estate.property" | ||||||||||||||||||
_description = "reals estate properties" | ||||||||||||||||||
|
||||||||||||||||||
name = fields.Char('Property Name',required=True) | ||||||||||||||||||
offer_ids=fields.One2many("estate.property.offer","property_id",string="Offers Received") | ||||||||||||||||||
tag_ids=fields.Many2many("estate.property.tags",string="Tags") | ||||||||||||||||||
buyer_id=fields.Many2one("res.partner",string="Buyer") | ||||||||||||||||||
salesperson_id=fields.Many2one("res.users",string="Sales Person",default=lambda self: self.env.user) | ||||||||||||||||||
property_type_id = fields.Many2one("estate.property.types", string="Property Type") | ||||||||||||||||||
description = fields.Text('The Descritption') | ||||||||||||||||||
postcode = fields.Char() | ||||||||||||||||||
date_availability = fields.Date(default=date.today()+ timedelta(days=90),copy=False) | ||||||||||||||||||
expected_price = fields.Float(required=True) | ||||||||||||||||||
selling_price = fields.Float(copy=False,readonly=True) | ||||||||||||||||||
bedrooms = fields.Integer(default=2) | ||||||||||||||||||
living_area = fields.Integer() | ||||||||||||||||||
facades = fields.Integer() | ||||||||||||||||||
garage = fields.Boolean() | ||||||||||||||||||
garden = fields.Boolean() | ||||||||||||||||||
garden_area= fields.Integer() | ||||||||||||||||||
garden_orientation = fields.Selection([("North","North"),("South","South"),("East","East"),("West","West")]) | ||||||||||||||||||
active = fields.Boolean(default=True) | ||||||||||||||||||
state = fields.Selection([("New","New"),("Offer Received","Offer Received"),("Offer Accpeted","Offer Accepted"),("Solde","Solde"),("Cancelled","Cancelled")],copy=False,default="New") | ||||||||||||||||||
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.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||
from odoo import fields, models | ||||||
from datetime import date, timedelta | ||||||
|
||||||
class EstatePropertyOffer(models.Model): | ||||||
_name = "estate.property.offer" | ||||||
_description = "reals estate properties offer" | ||||||
|
||||||
property_type_id= fields.Char('Property Offer ID') | ||||||
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.
Suggested change
misleading name |
||||||
price = fields.Float('Le Prix') | ||||||
status = fields.Selection([("Accepted","Accepted"),("Refused","Refused")],copy=False) | ||||||
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.
Suggested change
|
||||||
partner_id=fields.Many2one("res.partner",required=True) | ||||||
property_id=fields.Many2one("estate.property",required=True) | ||||||
|
||||||
# properties = fields.One2many("estate.property","property_type_id",string="properties") |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,9 @@ | ||||||
from odoo import fields, models | ||||||
from datetime import date, timedelta | ||||||
|
||||||
class EstatePropertyType(models.Model): | ||||||
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.
Suggested change
|
||||||
_name = "estate.property.tags" | ||||||
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.
Suggested change
a record represents only one tag |
||||||
_description = "common characteristics of the properties" | ||||||
|
||||||
name = fields.Char('Property Tag Name',required=True) | ||||||
properties = fields.Many2many("estate.property","tag_ids",string="properties") | ||||||
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.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,10 @@ | ||||||
from odoo import fields, models | ||||||
from datetime import date, timedelta | ||||||
|
||||||
class EstatePropertyType(models.Model): | ||||||
_name = "estate.property.types" | ||||||
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.
Suggested change
Each record in this file represents a single estate property type, so the name should be clear and not misleading. |
||||||
_description = "reals estate properties" | ||||||
|
||||||
name = fields.Char('Property Type Name',required=True) | ||||||
property_type_id= fields.Char('Property Type ID',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. what is this field, why do you need it? |
||||||
properties = fields.One2many("estate.property","property_type_id",string="properties") | ||||||
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.
Suggested change
|
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 | ||
estate.access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 | ||
estate.access_estate_property_types,access_estate_property_types,model_estate_property_types,base.group_user,1,1,1,1 | ||
estate.access_estate_property_tags,access_estate_property_tags,model_estate_property_tags,base.group_user,1,1,1,1 | ||
estate.access_estate_property_offer,access_estate_property_offer,model_estate_property_offer,base.group_user,1,1,1,1 |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,67 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<?xml version="1.0"?> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<odoo> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<record id="estate_property_view_form" model="ir.ui.view"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="name">estate.property.view.form</field> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="model">estate.property</field> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="type">form</field> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="arch" type="xml"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<form string="Test"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<sheet> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="name"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+23
to
+24
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.
Suggested change
there is no need of putting each one of them in a group |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="expected_price"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="date_availability"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+31
to
+32
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.
Suggested change
same here |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="selling_price"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<notebook> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<page string="Description"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="description"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="tag_ids" widget="many2many_tags"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="bedrooms"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="property_type_id"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="buyer_id"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="salesperson_id"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="living_area"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="facades"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="garage"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="garden"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="garden_area"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="garden_orientation"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="state"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Suggested change
respect indentation and format |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</page> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<page string="Other Info"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="buyer_id"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="salesperson_id"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</page> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<page string="Offers"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<field name="offer_ids"/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</page> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</notebook> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</sheet> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</form> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</field> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Suggested change
remove this line, it's useless |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</record> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</odoo> |
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. List views are typically used for summarizing key information. Fields like offer_ids, tag_ids, and living_area may not be relevant for a list view. Instead, prioritize fields that give a quick overview of the estate property. |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,29 @@ | ||||||||||||||||||||||||||||||
<?xml version="1.0"?> | ||||||||||||||||||||||||||||||
<odoo> | ||||||||||||||||||||||||||||||
<record id="estate_property_view_list" model="ir.ui.view"> | ||||||||||||||||||||||||||||||
<field name="name">estate.property.view.list</field> | ||||||||||||||||||||||||||||||
<field name="model">estate.property</field> | ||||||||||||||||||||||||||||||
<field name="type">list</field> | ||||||||||||||||||||||||||||||
<field name="arch" type="xml"> | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
<list string="Tests"> | ||||||||||||||||||||||||||||||
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="Tests" on the tag seems unrelated to the content of the view. Replace it with a more appropriate name like Estate Properties.
Suggested change
|
||||||||||||||||||||||||||||||
<field name="name"/> | ||||||||||||||||||||||||||||||
<field name="tag_ids" widget="many2many_tags"/> | ||||||||||||||||||||||||||||||
<field name ="offer_ids" widget="many2many_tags"/> | ||||||||||||||||||||||||||||||
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.
Suggested change
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 offer_ids field uses the many2many_tags widget, which is not suitable for list views. Instead, consider showing a count or summary of related offers. |
||||||||||||||||||||||||||||||
<field name="property_type_id"/> | ||||||||||||||||||||||||||||||
<field name="buyer_id"/> | ||||||||||||||||||||||||||||||
<field name="salesperson_id"/> | ||||||||||||||||||||||||||||||
<field name="bedrooms"/> | ||||||||||||||||||||||||||||||
<field name ="state"/> | ||||||||||||||||||||||||||||||
<field name ="garden"/> | ||||||||||||||||||||||||||||||
<field name ="postcode"/> | ||||||||||||||||||||||||||||||
<field name ="date_availability"/> | ||||||||||||||||||||||||||||||
<field name ="expected_price"/> | ||||||||||||||||||||||||||||||
<field name ="selling_price"/> | ||||||||||||||||||||||||||||||
<field name ="living_area"/> | ||||||||||||||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||||||||||||||
</list> | ||||||||||||||||||||||||||||||
</field> | ||||||||||||||||||||||||||||||
</record> | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
</odoo> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,10 @@ | ||||||
<?xml version="1.0" encoding="utf-8"?> | ||||||
<odoo> | ||||||
<menuitem id="estate_menu_root" name="Real Estate"> | ||||||
<menuitem id="test_first_level_menu" name="Properties"> | ||||||
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. use descriptive id for the menu item
Suggested change
|
||||||
<menuitem id="test_model_menu_action" action="estate_property_view" /> | ||||||
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. same here:
Suggested change
|
||||||
</menuitem> | ||||||
|
||||||
</menuitem> | ||||||
|
||||||
</odoo> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<record id="estate_property_view" model="ir.actions.act_window"> | ||
<field name="name">View properties</field> | ||
<field name="res_model">estate.property</field> | ||
<field name="view_mode">list,kanban,form</field> | ||
</record> | ||
</odoo> |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,35 @@ | ||||||||||||||
<?xml version="1.0"?> | ||||||||||||||
<odoo> | ||||||||||||||
<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="type">search</field> | ||||||||||||||
<field name="arch" type="xml"> | ||||||||||||||
|
||||||||||||||
<search string="Tests"> | ||||||||||||||
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.
Suggested change
|
||||||||||||||
<field name="name"/> | ||||||||||||||
<field name="property_type_id"/> | ||||||||||||||
<field name="bedrooms"/> | ||||||||||||||
<field name="description"/> | ||||||||||||||
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. why would someone search for a property by its description?? |
||||||||||||||
<field name ="postcode"/> | ||||||||||||||
<field name ="date_availability"/> | ||||||||||||||
<field name ="expected_price"/> | ||||||||||||||
Comment on lines
+14
to
+16
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.
Suggested change
|
||||||||||||||
<field name="buyer_id"/> | ||||||||||||||
<field name="salesperson_id"/> | ||||||||||||||
<field name ="selling_price"/> | ||||||||||||||
<field name ="living_area"/> | ||||||||||||||
Comment on lines
+20
to
+21
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.
Suggested change
|
||||||||||||||
<group expand="1" string="Group By"> | ||||||||||||||
<filter string="BedRooms" name="bedrooms" context="{'group_by':'bedrooms', 'residual_visible':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.
Suggested change
|
||||||||||||||
</group> | ||||||||||||||
<filter string="Postcode" name="bedrooms" context="{'group_by':'postcode', 'residual_visible':True}"/> | ||||||||||||||
<filter string="Buyer" name="bedrooms" context="{'group_by':'buyer_id', 'residual_visible':True}"/> | ||||||||||||||
<filter string="With Garden" name="garden" domain="[('garden', '=', True)]"/> | ||||||||||||||
<filter string="Available" name="garden" domain="[('state', 'in',['New','Offer Received'] )]"/> | ||||||||||||||
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. filters should have a unique name |
||||||||||||||
|
||||||||||||||
|
||||||||||||||
</search> | ||||||||||||||
</field> | ||||||||||||||
</record> | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
</odoo> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<record id="estate_offer_view" model="ir.actions.act_window"> | ||
<field name="name">View property Offer</field> | ||
<field name="res_model">estate.property.offer</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<menuitem id="estate_menu_root" name="Real Estate"> | ||
<menuitem id="estate_settings" name="Settings"> | ||
<menuitem id="estate_offer_menu_action" action="estate_offer_view" /> | ||
</menuitem> | ||
|
||
</menuitem> | ||
|
||
</odoo> |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,53 @@ | ||||||||||||||||||||||||
<?xml version="1.0"?> | ||||||||||||||||||||||||
<odoo> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
<!-- the list view --> | ||||||||||||||||||||||||
<record id="estate_offer_view_list" model="ir.ui.view"> | ||||||||||||||||||||||||
<field name="name">estate.offer.view.list</field> | ||||||||||||||||||||||||
<field name="model">estate.property.offer</field> | ||||||||||||||||||||||||
<field name="type">list</field> | ||||||||||||||||||||||||
<field name="arch" type="xml"> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
<list string="Tests"> | ||||||||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||||||||
<field name="price"/> | ||||||||||||||||||||||||
<field name="partner_id"/> | ||||||||||||||||||||||||
<field name="status"/> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
</list> | ||||||||||||||||||||||||
</field> | ||||||||||||||||||||||||
</record> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
<!-- the form view --> | ||||||||||||||||||||||||
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 fields are in a single group, which makes the form cluttered. Logical grouping is necessary for clarity. For example:
|
||||||||||||||||||||||||
<record id="estate_type_view_form" model="ir.ui.view"> | ||||||||||||||||||||||||
<field name="name">estate.offer.view.form</field> | ||||||||||||||||||||||||
<field name="model">estate.property.offer</field> | ||||||||||||||||||||||||
<field name="type">form</field> | ||||||||||||||||||||||||
<field name="arch" type="xml"> | ||||||||||||||||||||||||
<form string="Test"> | ||||||||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||||||||
<sheet> | ||||||||||||||||||||||||
<group> | ||||||||||||||||||||||||
<field name="price" /> | ||||||||||||||||||||||||
<field name="partner_id"/> | ||||||||||||||||||||||||
<field name="status"/> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
</group> | ||||||||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||||||||
</sheet> | ||||||||||||||||||||||||
</form> | ||||||||||||||||||||||||
</field> | ||||||||||||||||||||||||
</record> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
<!-- search view --> | ||||||||||||||||||||||||
<record id="estate_tag_view_search" model="ir.ui.view"> | ||||||||||||||||||||||||
<field name="name">estate.offer.view.search</field> | ||||||||||||||||||||||||
<field name="model">estate.property.offer</field> | ||||||||||||||||||||||||
<field name="type">search</field> | ||||||||||||||||||||||||
<field name="arch" type="xml"> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
<search string="Tests"> | ||||||||||||||||||||||||
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.
Suggested change
|
||||||||||||||||||||||||
<field name="partner_id"/> | ||||||||||||||||||||||||
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. Only the partner_id field is available for searching, which is insufficient. Add fields like price, status, and date_deadline. |
||||||||||||||||||||||||
</search> | ||||||||||||||||||||||||
</field> | ||||||||||||||||||||||||
</record> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
</odoo> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<record id="estate_tag_view" model="ir.actions.act_window"> | ||
<field name="name">View property Tags</field> | ||
<field name="res_model">estate.property.tags</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<menuitem id="estate_menu_root" name="Real Estate"> | ||
<menuitem id="estate_settings" name="Settings"> | ||
<menuitem id="estate_tag_menu_action" action="estate_tag_view" /> | ||
</menuitem> | ||
|
||
</menuitem> | ||
|
||
</odoo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use lowercase keys for state values for consistency with Odoo's best practices.