Skip to content

[ADD] Estate: Add real estate module#1331

Draft
rasin-odoo wants to merge 11 commits into
odoo:19.0from
odoo-dev:19.0-training-rasin
Draft

[ADD] Estate: Add real estate module#1331
rasin-odoo wants to merge 11 commits into
odoo:19.0from
odoo-dev:19.0-training-rasin

Conversation

@rasin-odoo

@rasin-odoo rasin-odoo commented Jun 5, 2026

Copy link
Copy Markdown

Created the initial structure of the Estate module for Odoo 19 Technical Training. Added the required __init__.py and __manifest__.py files.

@robodoo

robodoo commented Jun 5, 2026

Copy link
Copy Markdown

Pull request status dashboard

@rasin-odoo rasin-odoo changed the title [ADD]estate: Add real estate module [ADD] Estate: Add real estate module Jun 8, 2026

@bit-odoo bit-odoo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hello @rasin-odoo
Great Work!

Can you please add a description for this commit message 487f4e3

Also, improve the PR description.

Thanks

<field name="bedrooms"/>
<field name="living_area"/>
<field name="facades"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary diff.

id="estate_menu_root"
name="Real Estate"
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary diff.

name="Advertisements"
parent="estate_menu_root"
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary diff.

Comment thread estate/views/estate_property_views.xml Outdated
<field name="view_mode">list,form</field>
</record>

</odoo> 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.

@rasin-odoo rasin-odoo force-pushed the 19.0-training-rasin branch from e871574 to b6f4f53 Compare June 22, 2026 13:04

@bit-odoo bit-odoo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hello,
Can you please correct the tag of this commit message - d3c241b

No need to do a separate commit for this - 487f4e3, 53f1768

Can you please improve the PR Description?

Thanks

Comment thread estate/data/data_tags.xml Outdated
<record id="estate_property_tag_5" model="estate.property.tag">
<field name="name">Semi-furnished</field>
</record>
</odoo> 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 thread estate/data/data_type.xml Outdated
<record id="estate_property_type_6" model="estate.property.type">
<field name="name">Mansion</field>
</record>
</odoo> 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 thread estate/models/estate_property_tag.py Outdated
_description = "Real Estate Property Tag"

name = fields.Char(required=True)

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 only one empty line at the end of the file.

Comment thread estate/security/ir.model.access.csv Outdated
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1
access_estate_property_type,access_estate_property_type,model_estate_property_type,base.group_user,1,1,1,1
access_estate_property_tag,access_estate_property_tag,model_estate_property_tag,base.group_user,1,1,1,1
access_estate_property_offer,access_estate_property_offer,model_estate_property_offer,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.

</field>
</record>

</odoo> 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.

@@ -0,0 +1,8 @@
from odoo import fields, models

class EstatePropertyTag(models.Model):

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 2 blank lines before it.

@@ -0,0 +1,7 @@
from odoo import fields, models

class EstatePropertyType(models.Model):

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 2 blank lines before it.

Comment thread estate/models/estate_property_offer.py Outdated
_description = "Real Estate Property Offer"

price = fields.Float()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary empty line.

Comment thread estate/models/estate_property_offer.py Outdated
],
copy=False,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary empty line.

Comment thread estate/models/estate_property_offer.py Outdated
"res.partner",
required=True,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary empty line.

@rasin-odoo rasin-odoo force-pushed the 19.0-training-rasin branch 2 times, most recently from f30148b to 93636cb Compare June 26, 2026 12:14
rasin-odoo added 10 commits July 1, 2026 16:20
The following module introduces the addition of Real Estate Module with
different functionalities.
The real estate module needs a model to store property
information.
This commit introduces the estate.property model with its
basic fields and registers the model within the module.
Add the first XML data files for the estate module to expose the
estate.property model through the user interface.

A window action is introduced to link the model with the client
views, and a three-level menu hierarchy is added to make property
records accessible from the application dashboard.

The menu structure follows the standard Odoo navigation pattern
of root menu, first-level menu and action menu while keeping
data files loaded in the proper sequence.
Improve the property model by defining default values and
field behaviors required by the real estate workflow.

The number of bedrooms now defaults to two and the
availability date is automatically initialized three months
in the future. The selling price is made read-only because
it will be managed later through the offer process.

The selling price and availability date are excluded from
record duplication to avoid carrying over values that should
be recomputed or re-entered for a new property.
This change introduces dedicated list, form and search views for
the estate.property model to improve record visualization and
navigation.
1. Add a custom list view to display key property information.
2. Add a custom form view with grouped fields and notebook pages.
3. Add a custom search view with shortcuts for common search fields.
4. Add domain-based filters and postcode grouping options.
Implemented Chapter 7: Relations Between Models

- Added estate.property.type model with menus, action, views, and access rights
- Linked properties to property types using Many2one (property_type_id)
- Added buyer (res.partner) and salesperson (res.users) Many2one fields
- Set current user as default salesperson and prevented buyer from being copied
- Added estate.property.tag model with menus, action, views, and access rights
- Linked properties and tags using Many2many (tag_ids) with tag widget support
- Added estate.property.offer model with price, status, partner, and property fields
- Linked properties and offers using One2many (offer_ids) and Many2one (property_id)
- Created offer views and integrated offers into the property form
- Updated manifests, model imports, security rules, and views to support new relationships
Added sample data for the Real Estate module

- Created data/ directory for predefined records
- Added sample property records
- Added sample property type records
- Added sample property tag records
- Registered XML data files in the module manifest
- Simplified testing and development with loaded data
The changes impact the estate module by introducing dynamic field computation
and client-side field updates for property and offer records.

The goal is to keep values that depend on other fields consistent without
requiring users to update them manually. Property information such as the
total area and the highest offer should always reflect the current data, while
offer validity should remain synchronized with its deadline regardless of
which value the user edits. Likewise, providing default garden values improves
data entry by reducing repetitive manual input and guiding users toward
consistent records.

To achieve this, computed fields with declared dependencies are introduced for
derived values, an inverse method is implemented to synchronize validity and
deadline in both directions, and an onchange method is added to update garden
information directly in the form before the record is saved.
@rasin-odoo rasin-odoo force-pushed the 19.0-training-rasin branch from 9b7f3ee to 0aed7c4 Compare July 1, 2026 11:02
Introduce workflow actions for properties and offers to enforce the
real estate business process through explicit user actions instead of
manual state changes.

Properties can now be marked as sold or cancelled with validations that
prevent invalid workflow transitions. Offers can be accepted or refused,
and accepting an offer automatically updates the related property's buyer,
selling price, and workflow state.

The first offer created for a property also updates its state from "New"
to "Offer Received", ensuring that the property's lifecycle accurately
reflects its commercial progress.

These changes centralize the business rules in model methods, improving
data consistency and preventing invalid operations through user-facing
errors.
@rasin-odoo rasin-odoo force-pushed the 19.0-training-rasin branch from 0aed7c4 to a001cff Compare July 2, 2026 05:52
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