-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
18.0 training aele #232
base: 18.0
Are you sure you want to change the base?
18.0 training aele #232
Conversation
estate/models/estate.py
Outdated
_order = "sequence" | ||
|
||
name = fields.Char('Name', required=True, translate=True) | ||
description = fields.Text("Description", required=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.
required=False
is true by default
Note the CI/Style check is failing |
sequence = fields.Integer() | ||
# Relations | ||
property_ids = fields.One2many(comodel_name='estate.property', inverse_name='property_type_id') | ||
offer_ids = fields.One2many(comodel_name='estate.property.offer', inverse_name='property_type_id') |
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.
There is no field 'property_type_id' in model 'estate.property.offer'
estate/__manifest__.py
Outdated
{ | ||
'name': "Real Estate", | ||
'version': '1.0', | ||
'depends': ['base', 'mail'], |
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.
why are you depending on mail?!!
estate/models/estate_property.py
Outdated
class EstateProperty(models.Model): | ||
_name = "estate.property" | ||
_description = "Property data model" | ||
_inherit = ['mail.thread'] |
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.
Why are you inheriting from mail.threads?
estate/models/estate_property.py
Outdated
selection=[('n', 'North'), | ||
('s', 'South'), | ||
('e', 'East'), | ||
('w', 'West'), | ||
], |
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.
selection=[('n', 'North'), | |
('s', 'South'), | |
('e', 'East'), | |
('w', 'West'), | |
], | |
selection=[ | |
('north', 'North'), | |
('south', 'South'), | |
('east', 'East'), | |
('west', 'West'), | |
], |
what you did is not wrong but this is the name that will be used in the database so it's better to be more that one character
Kindly ensure that you follow the commit message structure outlined in the Odoo documentation: Git Guidelines. |
I have completed the training CH 1, 2, 3, 4