Skip to content

[ADD] estate: Add real estate module structure#1332

Draft
saver-odoo wants to merge 6 commits into
odoo:19.0from
odoo-dev:19.0-tutorials-saver
Draft

[ADD] estate: Add real estate module structure#1332
saver-odoo wants to merge 6 commits into
odoo:19.0from
odoo-dev:19.0-tutorials-saver

Conversation

@saver-odoo

Copy link
Copy Markdown

Estate module for managing real estate advertisements in Odoo.

Estate module for managing real estate advertisements in Odoo.
@robodoo

robodoo commented Jun 5, 2026

Copy link
Copy Markdown

Pull request status dashboard

This commit adds the required access rights to ensure authorized users can
interact with the models according to their role configuration.
Define 'test_model_action' window action with list and form modes
Implement structured root, category, and action menus for Real Estate
Define explicit list view columns for estate.property.
Create a structured form view layout using sheets, groups, and notebooks.
Implement a search view with custom fields, an 'Available' filter, and
a 'Group By' postcode option.
This commit introduces dedicated offer and tag models with the
necessary views, actions, menus, and access rights. Properties can
now be associated with multiple tags and offers
This commit adds sample properties, types, and offers to the estate module
for testing.

@mash-odoo mash-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!
Good start on the task.
Please look into my comments..

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

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's the purpose of noupdate="1"? What difference will it make with/without writing it?

Comment thread estate/models/__init__.py
@@ -0,0 +1,4 @@
from . import estate_property as estate_property

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
from . import estate_property as estate_property
from . import estate_property

You can avoid writing this.

Comment on lines +1 to +2
from dateutil.relativedelta import relativedelta
from odoo import 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.

Please refer to this for ordering your imports

from odoo import fields, models


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

What's the purpose of writing models.Model?

garden = fields.Boolean()
garden_area = fields.Integer()
garden_orientation = fields.Selection(
[("north", "North"), ("south", "South"), ("east", "East"), ("west", "West")]

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
[("north", "North"), ("south", "South"), ("east", "East"), ("west", "West")]
[('north', "North"), ('south', "South"), ('east', "East"), ('west', "West")]

Try keeping the key(and other technical string) in single quotes and value(strings which are to be displayed on UI) in double quotes.

Comment on lines +6 to +7
_description = "this model is for estate property offers"
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.

Suggested change
_description = "this model is for estate property offers"
price = fields.Float()
_description = "this model is for estate property offers"
price = fields.Float()

)

expected_price = fields.Float(required=True)
selling_price = fields.Float(readonly=True, copy=False, default=3000)

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 give a default selling price?


class EstatePropertyTag(models.Model):
_name = "estate.property.tag"
_description = "this model provides tags for estate property"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Where can we view this description?

Comment on lines +9 to +10
<field name="postcode" string="Postcode"/>
<field name="bedrooms" string="Bedrooms"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Have you checked the difference without writing this string?

<field name="bedrooms" string="Bedrooms"/>
<field name="living_area" string="Living Area (sqm)"/>
<field name="facades" string="Facades"/>
<separator/>

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's the purpose of separator?

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