Skip to content

Conversation

@abbhi-Odoo
Copy link

@abbhi-Odoo abbhi-Odoo commented Jan 1, 2026

  1. Estate Module – Key Features:
  • Creates models to manage estate properties, property types, tags, and offers
  • Adds menus and actions to provide a clean and user-friendly interface
  • Adds field validations to prevent incorrect data entry, such as ensuring expected and selling prices are strictly positive
  • Handles business rule errors gracefully using UserError and ValidationError

- Adds property model with necessary fields.
- chapter 2,3
- Remove duplicate garden field in estate_property.py.
- Remove unnecessary space.
- chapter 2,3
- Remove duplicate garden field in estate_property.py.
- Remove unnecessary space.
- chapter 2,3
@robodoo
Copy link

robodoo commented Jan 1, 2026

Pull request status dashboard

@abbhi-Odoo abbhi-Odoo force-pushed the 19.0-estate-tutorial-abbhi branch from b4ab976 to 316dad9 Compare January 1, 2026 12:32
-This change introduces the basic UI navigation for the Estate module.
-It adds window actions and a menu hierarchy to access property records.
-It configures default field behaviors such as read-only fields, defaults,
and copy restrictions.
- chapter 4,5,6
@abbhi-Odoo abbhi-Odoo force-pushed the 19.0-estate-tutorial-abbhi branch from 316dad9 to 2111cd7 Compare January 1, 2026 12:48
Copy link

@bit-odoo bit-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 Work!

Can you please adapt your PR message and title acrroding to the guidelines.
Thanks

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

@bit-odoo bit-odoo Jan 2, 2026

Choose a reason for hiding this comment

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

- Add property types and tags models
- Link properties with buyers, salespersons, and types
- chapter 6,7
@abbhi-Odoo abbhi-Odoo changed the title 19.0 estate tutorial abbhi [ADD] estate:Initialize Real state module Jan 2, 2026
-Implemented a One2many field to link estate properties with their related offers.
-chapter: 7
@abbhi-Odoo abbhi-Odoo force-pushed the 19.0-estate-tutorial-abbhi branch from ebf724a to e50a962 Compare January 5, 2026 10:26
- Implemented computed fields using @api.depends
- Added onchange methods to update values dynamically in the UI
- Chapter: 8
Copy link

@bit-odoo bit-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 Work!

I have left some comments.
Please update your PR title and description.
Thanks


name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Char()
Copy link

Choose a reason for hiding this comment

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

Why postcode is char() field?

Comment on lines 1 to 3
from odoo import models, fields, api

from dateutil.relativedelta import relativedelta
Copy link

Choose a reason for hiding this comment

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

Please follow the import guidelines. Do not do same mistake repeatedly.

_description = "Estate Property Offer"

price = fields.Float(string="Price")

Copy link

Choose a reason for hiding this comment

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

Unneccary space.

("accepted", "Accepted"),
("rejected", "Rejected"),
], copy=False)

Copy link

Choose a reason for hiding this comment

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

Unneccary space.

], copy=False)

partner_id = fields.Many2one("res.partner", required=True)

Copy link

Choose a reason for hiding this comment

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

Unneccary space.

string="Property",
required=True
)

Copy link

Choose a reason for hiding this comment

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

Unneccary space.

string="Validity (days)",
default=7
)

Copy link

Choose a reason for hiding this comment

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

Unneccary space.

parent="estate_menu_root"
sequence="15"/>

<menuitem id="estate_menu_properties"
Copy link

Choose a reason for hiding this comment

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

@abbhi-Odoo
Copy link
Author

abbhi-Odoo commented Jan 6, 2026

I have made all changes according to the review suggestions. Thank you.

@abbhi-Odoo abbhi-Odoo changed the title [ADD] estate:Initialize Real state module [ADD] estate: Initialize Real state module Jan 6, 2026
- Added sold and cancel actions for property offers
- Linked accepted offer to property selling price and buyer
- Chapter: 9
@abbhi-Odoo abbhi-Odoo force-pushed the 19.0-estate-tutorial-abbhi branch from ed943ba to c427696 Compare January 7, 2026 09:44
- Added constraints to enforce unique tags and properties
- Fixed style issues and improved validation logic
- Chapter: 10
@abbhi-Odoo abbhi-Odoo force-pushed the 19.0-estate-tutorial-abbhi branch from defd568 to 52a77f4 Compare January 9, 2026 04:49
Copy link

@bit-odoo bit-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,
Can you please update your PR description.
I have made some comments.

Thanks

@@ -0,0 +1,17 @@
{
'name': "Estate",
Copy link

Choose a reason for hiding this comment

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

Please use the same quote throughout the file.

for record in self:
if record.property_id.selling_price or record.status == "accepted":
raise UserError("Offer is already accepted")
self.status = "accepted"
Copy link

Choose a reason for hiding this comment

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

Why did you used self?

if record.property_id.selling_price or record.status == "accepted":
raise UserError("Offer is already accepted")
self.status = "accepted"
rejected_offer = self.search([
Copy link

Choose a reason for hiding this comment

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

If we are expecting multiple valus then the variable name should be like rejected_offers.
And again why did you used self inside the loop?

- Added list and form views for property types.
- Enabled ordering in property type list.
- Hide Accept/Reject buttons once an offer is accepted.
- Chapter: 11
@abbhi-Odoo
Copy link
Author

I have made all changes according to the review suggestions. Thank you.

- Improved the user interface of the Estate module by refining list and form views.
- Added inline list views, statusbar widgets, conditional visibility of fields and buttons,
editable list views, color decorations, default search filters, and stat buttons.
- Chapter: 11
Copy link

@bit-odoo bit-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,
Can you please improve your PR title.
Thanks

Comment on lines +122 to +124
for record in self:
if record.state == "sold":
raise RedirectWarning("A sold property cannot be cancelled",

Choose a reason for hiding this comment

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

We can use filtered here, and it is good to make the error message translatable.

Comment on lines +130 to +132
for record in self:
if record.state == "cancelled":
raise UserError("A cancelled property cannot be sold")

Choose a reason for hiding this comment

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

We can use filtered here, and it is good to make the error message translatable.

if record.property_id.selling_price or record.status == "accepted":
raise UserError("Offer is already accepted")
record.status = "accepted"
rejected_offers = record.search([

Choose a reason for hiding this comment

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

It is not good to use a search() inside the loop.

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