Skip to content

19.0 tutorial delje - #1415

Open
Delvaux-Jean-Baptiste wants to merge 20 commits into
odoo:19.0from
odoo-dev:19.0-tutorial-delje
Open

Delvaux-Jean-Baptiste wants to merge 20 commits into
odoo:19.0from
odoo-dev:19.0-tutorial-delje

Conversation

@Delvaux-Jean-Baptiste

Copy link
Copy Markdown

[REF] Updated branch name
[FIX] Added extra end of file line

@robodoo

robodoo commented Sep 15, 2026

Copy link
Copy Markdown

Pull request status dashboard

@msho-odoo
msho-odoo marked this pull request as ready for review September 15, 2026 11:24

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

@Delvaux-Jean-Baptiste
Nice job on the branch situation 🔥

For the commit message we write in a way that aligns with when this commit is merged it will .....
so you might change [IMP] estate: Added models to something like [IMP] estate: add estate property model or however you like to describe your changes :)
refer to Git Guidlines

but really nice job, well done 👍
also left some comments for you to check

Comment thread estate/models/estate_property.py
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 thread estate/models/estate_property.py Outdated
facades= fields.Integer()
garage= fields.Boolean()
garden= fields.Boolean()
garden_orientation= fields.Selection(string='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.

It's good, but it's better to commit to a convention and follow it all the way, so for example in this field you wrote the attribute string before ='Type' but you didn't do that in name field Char('Estate Name')

Comment thread estate/models/estate_property.py Outdated
Comment on lines +18 to +24
garden_orientation= fields.Selection(string='Type',
selection=[('east', 'East'),
('west', 'West'),
('north', 'North'),
('south', 'South')
]
)

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's correct but we style it like this (see the suggestion).

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

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

Comment thread estate/models/estate_property.py Outdated
_name = "estate_property"
_description = "The details of a property"

name= fields.Char('Estate Name', required= True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We do spaces before and after the operator so it's name = fields not name= fields.
Better to check all style errors in your runbot and fix it :)
The log there provides a description for the reason of the error

[ADD] estate: add estate access for base users
@msho-odoo

Copy link
Copy Markdown

@Delvaux-Jean-Baptiste please mention me here when you think the PR is ready for another review, typically, after each chapter :)
Also remember to check the runbot for styling issues 😉

added fields and default values in fields of new estate

[IMP] estate: updated gitignore to exclude vs config
@Delvaux-Jean-Baptiste

Copy link
Copy Markdown
Author

@msho-odoo I believe I am ready for the last review of the day ;-)

[IMP] estate: Update List, Form and Search for cleaner display

@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 good work!

Regarding the commit message we use [ADD] for adding whole new modules, but in this case (adding some field, view or feature/logic) we use [IMP] tag (for improvement) which you will be using most of the time in your team :)

I also left you some comments to check and please Always remember to green your runbot before pinging of the review 😉

Comment thread estate/models/estate_property.py Outdated
expected_price = fields.Float(required = True)
selling_price = fields.Float()
bedrooms = fields.Integer()
date_availability = fields.Date(copy=False, default=fields.Date.today()+relativedelta(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.

directly valuating the fields.Date at default will work when imported but it will be stuck at this value, you should use lambda function. Search the codebase for it and let me know if you have any question :)

Comment thread estate/views/estate_menus_views.xml Outdated
Comment thread estate/views/estate_property_views.xml Outdated
Comment thread estate/views/estate_property_views.xml Outdated
Comment thread estate/views/estate_property_views.xml Outdated
Comment thread .gitignore
.mypy_cache/
.dmypy.json
dmypy.json

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 shouldn't see this file here :)
environmental files like this one (or .vscode) for example shouldn't be pushed with your commit

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Delvaux-Jean-Baptiste still can see the file 👀

Comment thread estate/views/estate_property_views.xml Outdated
@Delvaux-Jean-Baptiste

Copy link
Copy Markdown
Author

@msho-odoo I may or may not have forgotten to ask for review ysterday....
Anyway, chapters 7 to 10 are in here ;-)

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

Thank you for your work!

Don't forget to add the module name in your [FIX] commits as well and follow the git guidelines with the message.

Left you some comments, but please apply the comments whenever they apply, I might have not pointed every point in every file, but if one of my comments apply in some other file, apply it there as well (like the translation _ on every error message)

Thanks, keep it up 🔥

Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem id="estate_menu_root" name="Real Estate">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this one slipped out of the naming convention :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@msho-odoo Could you point me at which naming convention? I looked into a few other add-ons and I couldn't find some sort of pattern

Comment on lines +11 to +32
<record id="estate_property_tag_view_list" model="ir.ui.view">
<field name="name">estate.property.tag.list</field>
<field name="model">estate_property_tag</field>
<field name="arch" type="xml">
<list string="Tags">
<field string="Tags" name="name"/>
</list>
</field>
</record>

<!-- Form View -->
<record id="estate_property_tag_form" model="ir.ui.view">
<field name="name">estate.property.tag.form</field>
<field name="model">estate_property_tag</field>
<field name="arch" type="xml">
<form>
<sheet>
<h1><field name="name"></field></h1>
</sheet>
</form>
</field>
</record>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is it needed to add such views for list and form view to add changes to them? I am not sure if a chapter asks you to edit something in them but if not then you have them by default

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I believe it was asked at some point to put a list. I know it is by default, but I do believe it asked for a custom one for some reason.

Comment thread estate/views/estate_property_views.xml Outdated
Comment thread estate/views/estate_property_views.xml Outdated
Comment thread .gitignore
.mypy_cache/
.dmypy.json
dmypy.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Delvaux-Jean-Baptiste still can see the file 👀

@Delvaux-Jean-Baptiste

Copy link
Copy Markdown
Author

@msho-odoo New release. Fixed as much as I could. What I haven't fixed I don't know how to, I'd be gad to have some guidance ;-)
How can I remove the gitignore file for example?

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