Skip to content

[ADD] estate: estate_property model added#1151

Draft
maram-odoo wants to merge 9 commits intoodoo:19.0from
odoo-dev:19.0-real-estate-tutorial-maram
Draft

[ADD] estate: estate_property model added#1151
maram-odoo wants to merge 9 commits intoodoo:19.0from
odoo-dev:19.0-real-estate-tutorial-maram

Conversation

@maram-odoo
Copy link

[ADD] estate: estate_property model added

In the estate_property.py file, a new class EstateProperty is created to manage real estate properties in Odoo. It inherits from models.Model. The model is identified by _name = "estate.property".

The class includes fields such as name, postcode, and date_availability. It also has price-related fields like expected_price and selling_price. Property details are stored using fields like bedrooms, living_area, and facades. The garage and garden fields indicate whether these features exist, while garden_area and garden_orientation(selection field) store additional garden details.

@robodoo
Copy link

robodoo commented Feb 6, 2026

Pull request status dashboard

@maram-odoo maram-odoo force-pushed the 19.0-real-estate-tutorial-maram branch 2 times, most recently from e4df9e5 to db23fc9 Compare February 6, 2026 08:47
Chapter 4: Security - A Brief Introduction
This commit adds proper access control for the `estate.property` model by
introducing an entry in `ir.model.access.csv`.
@maram-odoo maram-odoo force-pushed the 19.0-real-estate-tutorial-maram branch 3 times, most recently from ba36ffb to da3ebde Compare February 9, 2026 12:17
Chapter 5 and 7:UI to play and Relations Between Models

added window action and menuitem for estate_property to make visible app in apps section
added form view and list view because the default view is never acceptable for a business application
relational field are added like property offer, property tag,property tag
and their model and views are created and added in security file.
Chapter 5: Finally, Some UI To Play With

1-previously at availability date field python built-in date.today function was
added but its odoo has its own Date.today function so added it and fixed that
2-default search filter and default group by is introduced in estate property view
Chapter 5: Finally, Some UI To Play With

1-removed unnecessary imports and depends(crm)
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 @maram-odoo
Great work!
Can you please improve all your commit message titles and PR title accroding to guidelines?

Thanks

Comment on lines 1 to 2
from odoo import fields, models
from datetime import timedelta

Choose a reason for hiding this comment

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

action="estate_property_type_action" />
</menuitem>
</menuitem>
</odoo> No newline at end of file

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 EOF.

</form>
</field>
</record>
</odoo> No newline at end of file

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 EOF.

<field name="res_model">estate.property.tag</field>
<field name="view_mode">list,form</field>
</record>
</odoo> No newline at end of file

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 EOF.

</list>
</field>
</record>
<record id="estate_property_tag_view_form" model="ir.ui.view">

Choose a reason for hiding this comment

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

Leave one space before it for better readability.

@maram-odoo maram-odoo force-pushed the 19.0-real-estate-tutorial-maram branch 2 times, most recently from 617c590 to 78a890c Compare February 11, 2026 15:51
…and filter improved

Chapter 8: Computed Fields And Onchanges

computed field like total area added and according method is added for calculating total area by adding living
area and garden area.
same best offer field added that automatically assign max offer price from all recived offer.
some filter and group by added and styling and readability is improved.
@maram-odoo maram-odoo force-pushed the 19.0-real-estate-tutorial-maram branch from 78a890c to e390172 Compare February 11, 2026 16:24
Chapter 8: Computed Fields And Onchanges

inverse method implemented for computed field validity and date_deadline by help of timedelta and
fields Date today method
@maram-odoo maram-odoo force-pushed the 19.0-real-estate-tutorial-maram branch from ea66837 to b12a4f3 Compare February 13, 2026 04:31
…methods

Chapter 8: Computed Fields And Onchanges

fixed date_availability default value 3-months by relativedelta instead of time delta because timedelta only
calculates days but we need months.
fixed compute method and inverse method for date deadline by using create date or today date,because if it is
only today date than it will again recompile if we change validity.
onchange decorator introduce in garden field to auto filling value of garden area and garden Orientation.
…eption handling

Chapter 9: Ready For Some Action?

Added the buttons ‘Cancel’ and ‘Sold’ to the estate.property model.
A cancelled property cannot be set as sold, and a sold property cannot be cancelled by help of usererror.
Added the buttons ‘Accept’ and ‘Refuse’ to the estate.property.offer model.
When an offer is accepted, selling price automatically set as offer price for the corresponding property.
also added the security rights and groups for estate property.
…er accepted

Chapter 9: Ready For Some Action?

added return to all button methods
also aded functionality to setting buyer after offer accepted
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