Skip to content

Conversation

@isgos-odoo
Copy link

@isgos-odoo isgos-odoo commented Jan 1, 2026

Introduces the Real Estate module to facilitate property sales..

This module allows real estate agencies to:

  • Manage Property Listings: Track property details (type, living area, garden) and pricing.
  • Handle Transactions: Manage the full workflow from "New" to "Sold," including availability dates.
  • Process Offers: Record, accept, or refuse buyer offers.
  • Assist Agents: Provide tools for salespersons to track their portfolio and view computed metrics (e.g., total area).

@robodoo
Copy link

robodoo commented Jan 1, 2026

Pull request status dashboard

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 update title of this commit message and also add the meesage into commit.
4712d52

Thanks

@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 No newline at end of file
Copy link

Choose a reason for hiding this comment

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

Should be one empty line at the EOF.

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,

I have left some comments.
Can you please improve this commit message - e49cf23, 4712d52

Also adapt the PR title and description.

Thanks

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

Choose a reason for hiding this comment

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


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?

Copy link
Author

Choose a reason for hiding this comment

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

I used Char because postcodes in many countries contain letters (e.g., Canada) .An Integer field would not be able to handle this.

('south', 'South'),
('east', 'East'),
('west', 'West'),
],
Copy link

Choose a reason for hiding this comment

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

Wrong indentation.

</form>
</field>
</record>
<record id="action_estate_property" model="ir.actions.act_window">
Copy link

Choose a reason for hiding this comment

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

It is good for readability if we leave one empty line above it.

id="estate_menu_root"
name="Real Estate"/>
<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.

@bit-odoo bit-odoo assigned bit-odoo and unassigned bit-odoo Jan 7, 2026
Implemented Chapters(1 & 2) Architecture Overview and New Application.

Changes:
- Created module directory `real_estate`.
- Defined `__manifest__.py` with metadata (name, depends, license).
- Added empty `__init__.py` to initialize the Python package.
Implemented Chapters 3 & 4 (Data Models and Fields and Security files).

Changes:
- Created the `estate.property` model.
- Added basic fields: name, description, postcode, expected_price, selling_price.
- Configured default values (e.g., availability date) and field attributes (required, copy=False).
Expose the `estate.property` model in the web interface to allow
basic user interaction.

Changes:
- Create `views/estate_property_views.xml`.
- Define `ir.actions.act_window` to open the property list.
- Define the menu structure:
    - Root: "Real Estate"
    - Level 1: "Advertisements"
    - Action Menu: "Properties"
- Add the new view file to the `data` list in `__manifest__.py`
- Solve the whiteSpace Error in ir.model.access.csv file
- Change in manifest file Auther and version.

Ref: Server Framework 101 - Chapter 5
Added the XML views for the estate property model.

- List view: added columns for name, price, bedrooms, and availability.
- Form view: organized fields into two columns using groups.
- Added a notebook to put the description and other details in tabs.
Added the Search view and refined the existing Form and List views for the
estate.property model (Chapter 6).

Changes:
- Added Search View: Includes standard search fields, 'Available' filter,
  and 'Postcode' group by.
- Form View: Added 'placeholder' text and 'help' tooltips for better UX.
- Form View: Implemented 'invisible' logic for garden fields (hides area/orientation
  if no garden).
Implemented the relational fields between models (Chapter 7) and addressed
code review comments.

Changes:
- Models: Added Many2one (Buyer, Salesperson) and One2many (Offers) fields.
- Form View: Integrated the Offers list directly inside the Property notebook.
- Menu: Updated menu item naming conventions based on feedback.
- Code Style: Improved indentation.
@isgos-odoo isgos-odoo force-pushed the 19.0-estate-tutorial-isgos branch from 4594df5 to fe00b97 Compare January 8, 2026 06:36
@isgos-odoo isgos-odoo changed the title [ADD] real_estate: create base module structure [ADD] real_estate: implement core property management module Jan 8, 2026
Implemented dynamic behavior and workflow logic for properties and offers
(Chapters 8 & 9).

Changes:
- Computed Fields: Added logic for total_area, best_price, and offer validity/deadline.
- Onchange: Implemented UI helper to auto-fill garden area and orientation.
- Actions: Added buttons to manage Property state (Sold/Cancel) and Offer status (Accept/Refuse).
- Logic: Implemented offer acceptance workflow to automatically set the buyer and selling price on the property.
Implemented SQL and Python constraints to ensure data integrity and
prevent duplicate or invalid data(chapter 10).

Changes:
- Enforced unique names for Types/Tags and unique offers per partner.
- Added price validation (90% of expected price) and positive value checks.
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

if record.price <= 0:
raise ValidationError("Offer Price Must be Positive")

_check_partner = models.Constraint('UNIQUE(partner_id, property_id)', "User have already made a offer on this property")

Choose a reason for hiding this comment

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

Please follow the coding guidelines.

Comment on lines +87 to +89
for record in self:
if record.state == 'cancelled':
raise UserError("Cancelled Properties Can Not 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.

Comment on lines +96 to +98
for record in self:
if record.state == 'sold':
raise UserError("Sold Properties can not be cancel")

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.

def action_approve(self):
for record in self:
if record.state == 'sold':
raise UserError("Sold properties cannot accept other Offers.")

Choose a reason for hiding this comment

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

Is good to make the error message translatable.

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