Skip to content

Conversation

@hemeh-odoo
Copy link

@hemeh-odoo hemeh-odoo commented Feb 6, 2026

This PR contains:

  • Chapter 1: Architecture Overview – Read about the multi-tier architecture of odoo and its module structure.
  • Chapter 2: A New Application – Created a new application structure implemented manifest.py .
  • Chapter 3: Models and Basic Fields – Defined models and their basic fields like estate.property and fields.
  • Chapter 4: Security – A Brief Introduction – Implemented basic access controls in csv file .
  • Chapter 5: Finally, Some UI to Play With – Added initial UI components in xml files.
  • Chapter 6: Basic Views – Implemented tree ,form and search views for models.

This introduces the initial estate module to manage real estate
properties.
@robodoo
Copy link

robodoo commented Feb 6, 2026

Pull request status dashboard

@hemeh-odoo hemeh-odoo force-pushed the 19.0-tutorials-hemeh branch 2 times, most recently from ccf5249 to fb49ce2 Compare February 10, 2026 10:08
[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
…state module was using default fallback view mechanism
…state module was using default fallback view mechanism
Copy link

@mash-odoo mash-odoo left a 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.

Comment on lines 37 to 43
selection=[
("New", "New"),
("Offer Accepted", "Offer Accepted"),
("Offer Received", "Offer Received"),
("Sold", "Sold"),
("Cancelled", "Cancelled"),
],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>

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?

Copy link
Author

@hemeh-odoo hemeh-odoo Feb 11, 2026

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">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="name" string="Title" />
<field name="name" string="Title"/>

Do not leave space at the end

Comment on lines 73 to 76
</search>


</field>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
</search>
</field>
</search>
</field>

Do not leave unnecessary lines

</record>

</data>
</odoo> No newline at end of file

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.

hemeh-odoo and others added 2 commits February 11, 2026 16:36
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants