Skip to content

[ADD] estate:estate module creation and model implementation.#1194

Draft
habar-odoo wants to merge 11 commits intoodoo:19.0from
odoo-dev:19.0-tutorials-estate-habar
Draft

[ADD] estate:estate module creation and model implementation.#1194
habar-odoo wants to merge 11 commits intoodoo:19.0from
odoo-dev:19.0-tutorials-estate-habar

Conversation

@habar-odoo
Copy link
Copy Markdown

@habar-odoo habar-odoo commented Mar 10, 2026

Real Estate Property Module

  1. End-to-End Property Lifecycle: Manage properties from initial listing to "Sold" status, including offer tracking (Accept/Refuse).
  2. Relational Data Mapping: Structured connections using Many2one (Types), One2many (Offers), and Many2many (Tags).
  3. Automated Business Logic: Computed fields for price calculations and Onchange functions for real-time UI updates.
  4. Data Integrity & Validation: Robust SQL Constraints and Python Constraints to prevent invalid pricing or duplicate entries.
  5. Custom User Interface: Optimized List, Form, and Search views with action buttons and intuitive menu navigation.
  6. Secure Access Control: Role-based Access Rights and Record Rules to ensure data privacy and user-specific views.

@robodoo
Copy link
Copy Markdown

robodoo commented Mar 10, 2026

Pull request status dashboard

Copy link
Copy Markdown

@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 @habar-odoo
Nice work!

I have added some comments.
No need to separate commit for this - 9394ad6, e69355a, bc2d081 , dede429

Can you please follow commit message guidelines?
https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html

Thanks

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

Choose a reason for hiding this comment

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

@@ -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
Copy Markdown

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 end of the file.

Comment on lines +11 to +14
'security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_menus.xml',
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

indentation issue.

Comment on lines +30 to +31
('offerreceived', 'Offer Received'),
('offeraccepted', 'Offer Accepted'),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
('offerreceived', 'Offer Received'),
('offeraccepted', 'Offer Accepted'),
('offer_received', 'Offer Received'),
('offer_accepted', 'Offer Accepted'),

A little bit readable 😅

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

All changes done!

@habar-odoo habar-odoo force-pushed the 19.0-tutorials-estate-habar branch 4 times, most recently from fba649c to 7781522 Compare March 21, 2026 09:01
Copy link
Copy Markdown

@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,
Great Work!

Can you please add a description to this commit - 7781522

Also, can you please improve all your commit titles and messages according to the guidelines - https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html#

Can you please improve the PR description?

Thanks

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

Choose a reason for hiding this comment

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

Can you please follow the import coding guidelines?

Comment on lines +17 to +19
facades = fields.Integer(string="Facades")
garage = fields.Boolean(string="Garage")
garden = fields.Boolean(string="Garden")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No need to add a string if your technical name and string name are the same because Odoo is generating the string by default.

</group>
</page>
<page string="Offers">
<field name="offer_ids"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

indentation issue.

<field name="name">estate.property.list</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<list string="Properties" limit="20">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What is the purpose of adding limit=20?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

By default, Odoo typically displays 80 records per page. Setting limit="20" showing only 20 records at a time

@habar-odoo habar-odoo force-pushed the 19.0-tutorials-estate-habar branch 3 times, most recently from d4b4165 to 57fb096 Compare March 27, 2026 13:20
Initialize the real estate addon with a proper manifest and
define the core 'estate.property' model. This provides the
foundation for managing property listings, including
essential fields like price, area, and availability.
@habar-odoo habar-odoo force-pushed the 19.0-tutorials-estate-habar branch from e8faf37 to e1f7fc8 Compare March 30, 2026 15:26
Implement the security layer for the estate module. Added
ir.model.access.csv to grant CRUD permissions to the standard
user groups, ensuring properties and offers are manageable
through the UI.
Introduce the UI entry points for the real estate module.
Defined the window action and menu hierarchy to allow users
to view and manage property records from the web interface.
Introduce custom layouts for property management. The form view
provides a structured data entry interface, while the search
view enables filtering by key attributes like price and status.
Introduce core relations for property management. Added property
types, tags, and offer tracking to support complex data structures.
This enables interaction through
Many2one, Many2many, and One2many relationships.

This completes Chapter 7 by linking properties with their
associated types, tags, and offers.
Add a new field that automatically calculates the total property area. By linking the living area and garden area, the system now updates the total size whenever either value changes. This removes the need for manual entry and prevents mistakes.
Implement business logic to automatically track the highest
bid for a property. Using a computed field, the system now
identifies the 'best price' from all related offers, ensuring
sellers see the most competitive deal at a glance.
1) Define two fields validity and deadline.
2) Create compute & inverse method for them
3) Also added search functionality in the estate property model for best offers.
1) Define _onchange_garden() to automatically set default garden_area and
 garden_orientation when the garden is enabled.
2) Clear these fields when the garden is disabled.
3) Add a warning notification when the garden checkbox is checked.
Added 'Cancel' and 'Sold' buttons to the estate.property model.
A sold property cannot be cancelled, and a cancelled property cannot be marked
as sold.
Used Odoo Exceptions to show error messages for invalid actions.
@habar-odoo habar-odoo force-pushed the 19.0-tutorials-estate-habar branch from e1f7fc8 to 9456a9a Compare March 30, 2026 15:34
This functionality define to accept & refuse offer once offer is accepted it
set selling price and buyer to the corresponding property.
generates error if more than one offer is try to accept, added buttons to the
corresponding actions used 'checked' & 'unchecked' icons.
@habar-odoo habar-odoo force-pushed the 19.0-tutorials-estate-habar branch from d8b352c to 176a677 Compare March 31, 2026 13:01
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