Skip to content

19.0 technical training coleo - #1422

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

coleo-odoo wants to merge 10 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.

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