Skip to content

19.0 technical training coleo - #1422

Open
coleo-odoo wants to merge 17 commits into
odoo:19.0from
odoo-dev:19.0-technical-training-coleo
Open

coleo-odoo wants to merge 17 commits into
odoo:19.0from
odoo-dev:19.0-technical-training-coleo

Conversation

@coleo-odoo

Copy link
Copy Markdown

No description provided.

@robodoo

robodoo commented Sep 15, 2026

Copy link
Copy Markdown

Pull request status dashboard

@msho-odoo msho-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.

Nice work 🔥
Well done on the commit messages format, just a nitpick you can ignore for now, that CLN tag is usually for heavy cleaning of the code base but usual small cleaning can have the IMP tag.

But it's worth to note that usually when you fix something after a review, no need to add a new commit, you can use git commit --amend which allows you to edit your commit message and also include your current staged changes to the same commit without making a new one.

Also left you some comments, and always remember to have your runbot checked when you push and make sure it's green :)

Comment thread .vscode/settings.json Outdated
@@ -0,0 +1,3 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ops, I should't see that file :)
see how to avoid adding such environment files in git pushes

Comment thread estate/models/estate_property.py Outdated
bedrooms = fields.Integer()
living_area = fields.Integer()
facades = fields.Integer()
garage = fields.Boolean()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good practice to have boolean fields on the form is_something or has_something so you might change this to has_garden and has_garage

Comment on lines +20 to +23
garden_orientation = fields.Selection(
string='Type',
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.

The styling is fine by me but when we have multiple values it's better to have them on separate files.

Suggested change
garden_orientation = fields.Selection(
string='Type',
selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')]
)
garden_orientation = fields.Selection(
string='Garden Orientation',
selection=[
('north', 'North'),
('south', 'South'),
('east', 'East'),
('west', 'West'),
]
)

nitpick: some teams might stick to single quotes being only on technical strings (the ones that the user don't see) and double quotes are for the strings that the user can see)
so for example the selection can be ('east', "East") instead of ('east', 'East') but some teams don't do this, they just stick to their own convention which is all single quotes (if possible) or all double quotes.
I see you are stick to single quotes, fine be me (though it's not always possible :) )

Comment thread estate/security/ir.model.access.csv Outdated
@@ -0,0 +1,2 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"estate.access_estate_property","access_estate_property","estate.model_estate_property","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.

Always add new line at the end of files.
no need to add the estate., the file is already in that module.
no need to add the double quotes as well, you can remove them.
Also as an improvement you can make the id access_estate_property_user (I added _user at the end) in case you want to add another rule on the same module but for the _manager not the base user

Comment thread estate/__manifest__.py Outdated
@@ -0,0 +1,12 @@
{
'name': 'Real Estate',
'author': 'coleo',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

author is usually Odoo S.A. :)

@msho-odoo

Copy link
Copy Markdown

@coleo-odoo just forgot to tell you, you can mention me here when you think the PR is ready for another review, typically, after each chapter :)

@coleo-odoo

Copy link
Copy Markdown
Author

@msho-odoo I think the PR is ready for review.
I finished Chapter 5. Sorry for the number of commits, I'll try to keep it to one per chapter.

@msho-odoo msho-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.

Thanks for the nice work 👍
Left you a couple of comments.

nitpick: I would stick the commit message to be estate: create... instead of estate: created... since it should make a whole sentence when it's concatenated with this commit will .... according to git guidlines

Comment thread estate/models/estate_property.py Outdated
date_availability = fields.Date()
date_availability = fields.Date(
copy=False,
default=fields.Date.add(fields.Date.today(), months=3)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In this default the date will get valued when this is first imported and will not change later with each creation, you should use lambda function to fix this. Search the codebase for lambda functions used in the default values of fields and apply it here :)

Comment thread estate/views/estate_menu.xml Outdated
<menuitem id="estate_menu_action" action="estate_action" name="Properties"/>
</menuitem>
</menuitem>
</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.

Always remember the EOF new line and Always remember to fix red runbot to be green before reviews :)

Comment thread estate/views/estate_menu.xml Outdated
@@ -0,0 +1,7 @@
<odoo>
<menuitem id="estate_menu_root" name="Real Estate">
<menuitem id="estate_first_level_menu" name="Advertisements">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Better to make ids more descriptive so that they indicate what they are without having to read the definition

Comment thread estate/views/estate_property_views.xml Outdated
<field name="view_mode">tree,form</field>
<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.

EOF line in ALL files please: and remember the red runbot is already guiding you to fix this stuff so please check it before the review :)

('sold', 'Sold'),
('cancelled', 'Cancelled')
],
default="new",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stick to a convention about quotes :)

Comment thread estate/__manifest__.py Outdated
'name': 'Real Estate',
'author': 'Odoo S.A.',
'license': 'LGPL-3',
'depends': [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nitpick: usually the depends list is written in one line since it's usually just small module names but no biggie

offer : compute  date_deadline according to validity
property : compute total_area  according to garden_area and living_area
compute best_price according to the best offer
add on_change to has_garden filling or clearing fields accordingly
@coleo-odoo
coleo-odoo force-pushed the 19.0-technical-training-coleo branch from a2b4c84 to 98ccc2f Compare September 17, 2026 11:28
@coleo-odoo

Copy link
Copy Markdown
Author

@msho-odoo The PR should be ready for review

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