-
Notifications
You must be signed in to change notification settings - Fork 2.6k
HAZEI Onboarding #1000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
HAZEI Onboarding #1000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small things here :)
estate/__init__.py
Outdated
@@ -0,0 +1 @@ | |||
from . import models No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End of file line is missing here
estate/__manifest__.py
Outdated
'summary' : 'Real Estate Management Tutorial', | ||
'application': True, | ||
|
||
} No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End of file line is missing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work here ! :D
I didn't highlight them all but be careful about the naming of the ids/files/names according to: https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html
estate/models/estate_property.py
Outdated
name = fields.Char(string="Title", required=True) | ||
description = fields.Text() | ||
postcode = fields.Char() | ||
date_availability = fields.Date(copy=False, readonly=True, default=date.today() + relativedelta(months=3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
date_availability = fields.Date(copy=False, readonly=True, default=date.today() + relativedelta(months=3)) | |
date_availability = fields.Date(copy=False, readonly=True, default=lambda self: date.today() + relativedelta(months=3)) |
If you don't do this, it will only be evaluated one time and not work tomorrow on a long running instance.
estate/models/estate_property.py
Outdated
string='garden_orientation', | ||
selection=[('north', 'North'), ('south', 'South'), | ||
('east', 'East'), ('west', 'West')]) | ||
active = fields.Boolean(default=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
active = fields.Boolean(default=False) | |
active = fields.Boolean() |
False is already the default for Boolean
No description provided.