Skip to content

Conversation

@dhvag-odoo
Copy link

No description provided.

- Set up the estate module based on the Odoo 19 Server Framework 101 tutorial
- Added estate.property model with proper naming conventions
- Implemented basic fields as introduced in chapters 1–3
- Kept the code aligned with Odoo ORM standards
- Continued the estate module implementation by completing Chapters 4–6
- Added and configured views, actions, and menus to make the estate.property model fully accessible from the UI
- Implemented list and form, views, filter, group-by
- Added required defaults and the active field
- Verified that all earlier checkpoints (Chapters 1–3) are still satisfied and working as expected
- Overall implementation remains consistent with Odoo ORM guidelines and framework best practices
@robodoo
Copy link

robodoo commented Jan 1, 2026

Pull request status dashboard

…er 7)

- Added relational fields (Many2one, One2many, Many2many) to the estate module
- Linked properties with types, offers, tags, buyer, and salesperson
- Created required views for managing offers within the property form
- Updated access rights for new models
- Fixed the import issue in estate_property_offer file.
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 @dhvag-odoo,
Good work on the new module..
Please check my comments and apply the needed changes

- Applied the changes suggested during code review
- Updated XML view structure and corrected attribute order
- Cleaned up naming issues in views and filters
- Adjusted default values and selection field keys
- Removed unnecessary field strings in the model
- Added new line in the file ir.model.access.csv
- This chapter introduces computed fields to derive values automatically.
- Field dependencies are managed using the @api.depends decorator.
- Onchange methods react to user input in real time on forms.
- Added accept and refuse actions for property offers
- Handled the case where only one offer should be accepted
- Updated property details like selling price and buyer when an offer is accepted
- Learn to add python and SQL constraint
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,
Good job on the PR!
Here are some few suggestions..

('sold', "Sold"),
('cancelled', "Cancelled"),
],
default="new",

Choose a reason for hiding this comment

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

Suggested change
default="new",
default='new',

Comment on lines 44 to 49
seller = fields.Many2one(
'res.users', string="Salesman", default=lambda self: self.env.user
)
buyer = fields.Many2one('res.partner', string="Buyer", copy=False)
tags = fields.Many2many('estate.property.tag')
offer = fields.One2many('estate.property.offer', 'property_id')

Choose a reason for hiding this comment

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

Please follow the naming conventions of these fields.
For example Many2Many should always have _ids suffix.
You can refer from here: https://www.odoo.com/documentation/19.0/developer/tutorials/server_framework_101/07_relations.html?

Comment on lines 6 to 8
'description': '''
This module provides functionality to manage real estate properties.
''',

Choose a reason for hiding this comment

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

Suggested change
'description': '''
This module provides functionality to manage real estate properties.
''',
'description': """
This module provides functionality to manage real estate properties.
""",

buyer = fields.Many2one('res.partner', string="Buyer", copy=False)
tags = fields.Many2many('estate.property.tag')
offer = fields.One2many('estate.property.offer', 'property_id')
total_area = fields.Float(compute='_compute_total')

Choose a reason for hiding this comment

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

Suggested change
total_area = fields.Float(compute='_compute_total')
total_area = fields.Float(compute='_compute_total_area')

Keep the method name in the format: _compute_field_name

Comment on lines 1 to 2
from odoo import api, fields, models
from dateutil.relativedelta import relativedelta

Choose a reason for hiding this comment

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

Comment on lines 24 to 28
<list>
<field name="name"/>
<field name="create_date"/>
<field name="write_date"/>
</list>

Choose a reason for hiding this comment

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

Fix indentation

<field name="facades"/>
<separator/>
<filter string="New / Offer Received" name="state"
domain="['|',('state', '=', 'new'), ('state', '=', 'offer received')]"/>

Choose a reason for hiding this comment

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

Can you write this in a different way?

- Improve the look and behavior of form and list views.
- Add status bar, decorations, and widgets for better clarity.
- Control button visibility based on record state.
- Set default sorting and make views more user-friendly.
- Enhance search and display to make records easier to understand.
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