Skip to content

[LOSBO] Real Estate Property Management - Tutorials - #1407

Draft
losbo-odoo wants to merge 8 commits into
odoo:19.0from
odoo-dev:19.0-tutorial-losbo
Draft

[LOSBO] Real Estate Property Management - Tutorials#1407
losbo-odoo wants to merge 8 commits into
odoo:19.0from
odoo-dev:19.0-tutorial-losbo

Conversation

@losbo-odoo

Copy link
Copy Markdown

Implementation of the estate tutorial module covering initial module setup, security access, and property models:

  • Initialized estate module along with manifest metadata (author and license).
  • Configured security access rights for the estate.property model.
  • Added initial views and menu structures to create property records.
  • Added custom list views and application icons.
  • Created the estate.property.type model along with initial view configurations.

[IMP] estate: added spcaes after comma in estate_property.py file
[IMP] estate: added a modal and fixed the working
…table (estate_property and estate_property_type) using Many2one
Differentiating the properties using tags, types along with tracking the offers
received for each property, will streamline property manangement

- introduced new models
  - 'estate.property.tags' : Labeling the properties
  - 'estate.proerty.types' : Categorizes properties
  - 'estate.property.offers' : track the buyer offers, prices and offer statuses

- linked new models to 'estate.proerty.py'
  - Many2many relation to 'estate.property.tags'
  - Many2one relation to 'estate.property.types'
  - One2many realtion to 'estate.property.offers'

- Updated UI views
  - Added estate_property_type_view.xml to manage property types.
  - Updated estate_property.xml to render type, tags and inline offer list tab
… and functions

I have added the available filter to allow users to isolate open properties, and i have added computed fields to dynamically calculate the fields
as i have added the relation between models it is necessary to add the ondelete attribute to handle the removed or unnecessary properties

1. Property Availabilty & filtering:
   - Added 'state' field to 'estate.property' to track the lifecycle of a listing
   - updated 'estate_property_views' to include the available filter, allowing users to isolate properties open for offer

2. Computed fields:
   - Implemented computed fields ('total_offers', 'total_area', 'best_price') along with their respective computed functions

3. Database Integrity:
   - Added `ondelete='cascade'` to the 'property_tag_ids' (Many2many relation)  in 'estate_property.py' model and to the 'property_id' (Many2many relation) in 'estate_property_offers'
@robodoo

robodoo commented Sep 9, 2026

Copy link
Copy Markdown

Pull request status dashboard

@losbo-odoo
losbo-odoo requested a review from bit-odoo September 9, 2026 07:18

@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 @losbo-odoo
Good Start

can you please improve your commit message? fcf8c80, e638942,
e640341,
8070edb

Thanks

# -*- coding: utf-8 -*-
{
'name': "Awesome Dashboard",
'name': "Awesome Dashboard1",

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

Comment thread estate/models/__init__.py

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 import it as per Odoo standard?

"res.users", string="salesperson", default=lambda self: self.env.user
)
offer_ids = fields.One2many("estate.property.offers", "property_id")

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

offer_ids = fields.One2many("estate.property.offers", "property_id")

total_offers = fields.Integer(compute="_compute_offers")

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

from odoo.exceptions import ValidationError


class TestModel(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.

Can you improve the class name?

Comment on lines +8 to +18
today = datetime.now()

month = today.month + 3
year = today.year
day = today.day

if month > 12:
year = year + 1
month = month % 12

three_month_date = today.replace(year=year, month=month, day=day)

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 explain me the purpose of this?

count = 0
if record.offer_ids:
for offers in record.offer_ids:
if offers.status == "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.

Why do you need this check?

<field name="property_tag_ids" widget="many2many_tags"/>
</div>
<group>
<group string="Pricing &amp; Availability">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It doesn't look good on the UI.

<field name="total_offers"/>
<field name="state"/>
</group>
<group string="Property Specs">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same here.

]
)
active = fields.Boolean("Active", default=True)
property_type_id = fields.Many2one("estate.property.type", string="Property_type")

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
property_type_id = fields.Many2one("estate.property.type", string="Property_type")
property_type_id = fields.Many2one("estate.property.type", string="Property type")

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