Skip to content

Conversation

@waterflow80
Copy link

@waterflow80 waterflow80 commented Jan 19, 2026

  • Created the estate module.
  • Created the EstateProperty model.

@robodoo
Copy link

robodoo commented Jan 19, 2026

Pull request status dashboard

@waterflow80 waterflow80 force-pushed the 19.0-develop-estate-module-hahas branch from ac904f3 to de075ba Compare January 19, 2026 16:10
@waterflow80 waterflow80 changed the title [ADD] Setup real estate application [ADD] Real estate application Jan 19, 2026
- Created the estate module.
- Created the EstateProperty model.
@waterflow80 waterflow80 force-pushed the 19.0-develop-estate-module-hahas branch from de075ba to ff5d6b3 Compare January 19, 2026 16:28
- Remvoed pylint error-ingoring commands.
- Added Ruff config file for style check.
- Reformated some files.
- Added security configuration for the estate module.
- Fixes the warning message about the access rules.
- Added a simple test action to the estate module.
@waterflow80 waterflow80 force-pushed the 19.0-develop-estate-module-hahas branch from e3002a3 to a2089f1 Compare January 20, 2026 13:37
Copy link

@plha-odoo plha-odoo left a comment

Choose a reason for hiding this comment

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

great work for the overall quality of the code and syntax.
congrats on using the correct convention for the commit titles.
a few small comments :

  • We try to always leave an empty line at the end of every file.
    If you are using vscode there is an option to automatically do it which is called Insert Final Newline.
  • make sure to add your ruff.toml file in a gitignore file so it's not pushed on your branch

Comment on lines 1 to 2
from datetime import date

from dateutil.relativedelta import relativedelta

Choose a reason for hiding this comment

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

no need for blank lines between related imports

Suggested change
from datetime import date
from dateutil.relativedelta import relativedelta
from datetime import date
from dateutil.relativedelta import relativedelta

Copy link
Author

Choose a reason for hiding this comment

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

Changed!

Set up the general user interface for the estate app/module.

- Added estate menu
- Added action window
- Set up the fields properties (required, default, etc..)
- Added the `active` reserved field to the view
@waterflow80 waterflow80 force-pushed the 19.0-develop-estate-module-hahas branch from fdca6dc to 3f06a7a Compare January 20, 2026 16:20
Adds three more views to the `estate` model:
- `list`: allows the display of the records in a tabular form.
- `form`: allows the create/edit of the record in a more sturctured way.
- `search`: allows the search for records using filters, and grouping the results
by some chosen fields.
    - We also defined a default filter: `Available`, which filters the results
by `state = New` or `state = Offer Received`.

Also adds some refactoring to align with the coding guidelines (new line, import
order, etc..).
Added three more features for the real estate: `type`, `tag`, and `offers`.

- A property can have one type, and a type can be assigned to multiple
properties.
- A property can have multiple tags, and each tag can be assinged to
multiple properties.
- A property can have multiple offers, and an offer can be assigned to
multiple properties.

In addition to the `fields.One2many('estate.property.offer')` defined in the `estate.property`
model, we had to add `fields.Many2one('estate.property')` in the `estate,property.offer`,
because the `One2many` is a virtual relationship.
Copy link

@plha-odoo plha-odoo left a comment

Choose a reason for hiding this comment

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

good job on applying the correct title convention for the last commits
a few comments:

  • don't forget to add your ruff.toml file in a gitignore file

Comment on lines +1 to +6
from . import (
estate_property,
estate_property_offer,
estate_property_tag,
estate_property_type,
)

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,
estate_property_offer,
estate_property_tag,
estate_property_type,
)
from . import estate_property
from . import estate_property_offer
from . import estate_property_tag
from . import estate_property_type

Copy link
Author

Choose a reason for hiding this comment

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

Actually, when I run:

ruff check estate/models/__init__.py --fix --config ruff.toml

ruff automatically reformats it that way.

Should I change the ruff.toml file ?

Comment on lines 1 to 3
from datetime import date

from dateutil.relativedelta import relativedelta

Choose a reason for hiding this comment

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

Suggested change
from datetime import date
from dateutil.relativedelta import relativedelta
from datetime import date
from dateutil.relativedelta import relativedelta

Copy link
Author

Choose a reason for hiding this comment

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

Same as this comment, ruff automatically formats it like that.

Maybe I'm using the wrong ruff.toml file ?

Comment on lines 1 to 3
from datetime import date

from dateutil.relativedelta import relativedelta

Choose a reason for hiding this comment

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

Suggested change
from datetime import date
from dateutil.relativedelta import relativedelta
from datetime import date
from dateutil.relativedelta import relativedelta

Copy link
Author

Choose a reason for hiding this comment

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

Please see comment.

Comment on lines 39 to 40
# res.users: the users of the system. Users can be 'internal', i.e. they have access to the Odoo backend. Or they can be
# 'portal', i.e. they cannot access the backend, only the frontend (e.g. to access their previous orders in eCommerce).

Choose a reason for hiding this comment

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

We try to add explication comment only when really needed (because of tricky behaviour for instance)

Copy link
Author

Choose a reason for hiding this comment

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

You're right, I just wanted to add them for reference for later (when I get back the PR in the future).

I removed them.

# res.users: the users of the system. Users can be 'internal', i.e. they have access to the Odoo backend. Or they can be
# 'portal', i.e. they cannot access the backend, only the frontend (e.g. to access their previous orders in eCommerce).
sales_person_id = fields.Many2one('res.users', string='Salesman', index=True, default=lambda self: self.env.user)
# res.partner: a partner is a physical or legal entity. It can be a company, an individual or even a contact address.

Choose a reason for hiding this comment

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

same here

copy=False,
)
partner_id = fields.Many2one('res.partner', required=True)
# Because a One2many is a virtual relationship, there must be a Many2one field defined in the comodel.

Choose a reason for hiding this comment

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

same here

Suggested change
# Because a One2many is a virtual relationship, there must be a Many2one field defined in the comodel.

Adds computed fields such as the `total area`. The `validity` can
also be updated automatically when the `total_area` is explicitly
set.

Adds `onchange` listeners to update the offer form's fields
`Garden Area` and `Garden Orientation` automatically when the
`Garden` field is set. When the latter field is set, the `Garden Area`
is given a default value of 10, and the `Garden Orientation` is set
to North.
@waterflow80 waterflow80 force-pushed the 19.0-develop-estate-module-hahas branch from 4b52e5d to 6754e8f Compare January 23, 2026 08:46
Adds `accept` and `cancel` buttons to the property form, and links
them to the correct python methods (actions).

When an offer is accepted, the property's buyer info, as well as
the selling price are automatically updated.
Adds constraints on field `expected_price`, tag names, type names,
and the minimum offer price accpeted (calculated based on the
expected price).

Some constraints are defined using plain SQL, and others using
the python's `@api.constrains`.
Adds the `title` attribute to the `button` tag.

Fixes the error: A button with icon attribute (fa-check) must have
title in its tag, parents, descendants or have text.
@waterflow80 waterflow80 requested a review from plha-odoo January 26, 2026 09:55
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