-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[ADD] estate: add base estate.property model #1152
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?
Conversation
This introduces the initial estate module to manage real estate properties.
ccf5249 to
fb49ce2
Compare
[ADD] estate: add base estate.property model This commit is to initialise real estate property model which is used to store basic property records. The model definition and module structure is according to the standard Odoo ORM module documentation. [IMP] added security folder and [CLN] estate_property.py with an extra line [CLN] Added extra space [CLN] Added End of line in estate/models/__init__.py file [ADD] Added estate_menus.xml and estate_property.xml Chapter 5 [IMP] Improved estate_menus.xml added estate_menu_advertisements_properties
…ecting state of the property
…state module was using default fallback view mechanism
…state module was using default fallback view mechanism
5722ae0 to
b381429
Compare
mash-odoo
left a comment
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.
Hello!
Thank you for your work!
Here are some suggestions, mostly linter as of now!
Please update description in your commits while pushing, regarding the chapters and topics covered.
| selection=[ | ||
| ("New", "New"), | ||
| ("Offer Accepted", "Offer Accepted"), | ||
| ("Offer Received", "Offer Received"), | ||
| ("Sold", "Sold"), | ||
| ("Cancelled", "Cancelled"), | ||
| ], |
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.
| selection=[ | |
| ("New", "New"), | |
| ("Offer Accepted", "Offer Accepted"), | |
| ("Offer Received", "Offer Received"), | |
| ("Sold", "Sold"), | |
| ("Cancelled", "Cancelled"), | |
| ], | |
| selection=[ | |
| ('new', "New"), | |
| ('offer_accepted', "Offer Accepted"), | |
| ('offer_received', "Offer Received"), | |
| ('sold', "Sold"), | |
| ('cancelled', "Cancelled"), | |
| ], |
Use underscores while defining keys for selection field.
Also the key should always come first, followed by the value.
| @@ -0,0 +1,21 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <odoo> | |||
| <data> | |||
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.
I noticed the <data> tag here, what was the reason for adding it?
Do you think the <data> tag changes anything functionally here, or would it behave the same without it?
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.
Mam generally the data tag acts as a container inside the odoo tag so that Odoo can load all records correctly. Initially, it worked when I had only one menuitem but later, after adding sub-menus and an action menu it started throwing an exception error . That’s why I included the data tag to ensure everything loads properly
| <odoo> | ||
| <data> | ||
|
|
||
| <record id="estate_property_tree" model="ir.ui.view"> |
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.
| <record id="estate_property_tree" model="ir.ui.view"> | |
| <record id="estate_property_view_list" model="ir.ui.view"> |
For naming a view: <model_name>_view_<view_type>, where view_type is kanban, form, list, search, …
You can refer this guideline: https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html#xml-ids-and-naming
| <data> | ||
|
|
||
| <record id="estate_property_tree" model="ir.ui.view"> | ||
| <field name="name">estate.property.tree</field> |
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.
| <field name="name">estate.property.tree</field> | |
| <field name="name">estate.property.view.list</field> |
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <list> | ||
| <field name="name" string="Title" /> |
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.
| <field name="name" string="Title" /> | |
| <field name="name" string="Title"/> |
Do not leave space at the end
| </search> | ||
|
|
||
|
|
||
| </field> |
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.
| </search> | |
| </field> | |
| </search> | |
| </field> |
Do not leave unnecessary lines
| </record> | ||
|
|
||
| </data> | ||
| </odoo> No newline at end of file |
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.
Always add an extra line at the end of the file.
Removed unnecessary blank lines between fields in estate_property.py Co-authored-by: mash-odoo <124269532+mash-odoo@users.noreply.github.com>
…or selection field in estate_property.py file and in estate_property_views.xml file renamed id from estate.property.tree to estate.property.view.list and removed unecessary whitespaces.

This PR contains: