Skip to content

19.0 technical onboarding macau - #1427

Open
mcauz wants to merge 8 commits into
odoo:19.0from
odoo-dev:19.0-technical-onboarding-macau
Open

mcauz wants to merge 8 commits into
odoo:19.0from
odoo-dev:19.0-technical-onboarding-macau

Conversation

@mcauz

@mcauz mcauz commented Sep 16, 2026

Copy link
Copy Markdown

No description provided.

@robodoo

robodoo commented Sep 16, 2026

Copy link
Copy Markdown

Pull request status dashboard

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

👋 Good Work

Comment thread estate/models/__init__.py
Comment on lines +1 to +6
from . import (
estate_property,
estate_property_offer,
estate_property_tag,
estate_property_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.

Nitpick: We usually do something like this instead

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



class EstateProperty(models.Model):
_name = '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.

We usually use name.of.module.name.of.model

Suggested change
_name = 'estate_property'
_name = 'estate.property'

Comment on lines +16 to +18
postcode = fields.Char(
string='Postcode',
)

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, if it's possible we try to keep lines as one (if they dont go over ~120 characters)

Suggested change
postcode = fields.Char(
string='Postcode',
)
postcode = fields.Char(string='Postcode')

date_availability = fields.Date(
string='Date availability',
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.

If not used inside a function fields.Date.today() is resolved when the server starts so if it runs for a few days you will end up with errors.

Suggested change
default=fields.Date.add(fields.Date.today(), months=3),
default=lambda self: fields.Date.add(fields.Date.today(), months=3),

estate.access_estate_property,access_estate_property,estate.model_estate_property,base.group_user,1,1,1,1
estate.access_estate_property_offer,access_estate_property_offer,estate.model_estate_property_offer,base.group_user,1,1,1,1
estate.access_estate_property_tag,access_estate_property_tag,estate.model_estate_property_tag,base.group_user,1,1,1,1
estate.access_estate_property_type,access_estate_property_type,estate.model_estate_property_type,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.

We try to always have an empty line at the end of every file.
You can use the Ruff extension with the config from https://runbot326.odoo.com/runbot/static/build/125365592-19-0/logs/ruff_config.txt to have warning about style inside your editor.
Disable auto formatting on save as we try to reduce the quantity of diff when editing file made by someone else
You can also check the ci/style from the runbot (https://runbot.odoo.com/runbot/bundle/190-technical-training-demat-512697) to check what it says.

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

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
'author': 'macau',
'author': 'Odoo S.A.',

@@ -0,0 +1,114 @@
from odoo import _, api, 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.

nitpick: useless import

Suggested change
from odoo import _, api, fields, models
from odoo import api, fields, models

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