-
Notifications
You must be signed in to change notification settings - Fork 2.8k
19.0 app traning raibr #1074
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?
19.0 app traning raibr #1074
Conversation
|
Hello, can you please ensure that your runbot is green 😄 |
dc88f8d to
138ea5d
Compare
138ea5d to
c02245d
Compare
b656e0e to
fcbae9f
Compare
Can you check again ;) |
fd47ba1 to
54edce7
Compare
The models.Constraint syntax does not exist in Odoo's ORM. SQL constraints must be defined using the _sql_constraints class attribute.
ab9d9a6 to
4626609
Compare
The models.Constraint syntax does not exist in Odoo's ORM. SQL constraints must be defined using the _sql_constraints class attribute.
4626609 to
f073fa7
Compare
| string="Deadline", | ||
| ) | ||
|
|
||
| # self.property_id.status = 'offer_received' when offer is created |
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.
This is useless as we can easily understand via the code right below 😄
| _order = 'price desc' | ||
|
|
||
| price = fields.Float(required=True, string="Price") | ||
| _check_price = models.Constraint('Check(price > 0)', "The offer price must be strictly positive.") |
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.
Try to avoid mixing fields with constraints so it is more readable.
| property_ids = fields.One2many(comodel_name='estate.property', inverse_name='property_type_id', string="Properties") | ||
| offer_count = fields.Integer(compute='_compute_offer_count', string="Offer Count") | ||
|
|
||
| def _compute_offer_count(self): |
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.
Is it normal that you don't have an api.depends here ?
| <field name="res_model">estate.property.type</field> | ||
| <field name="view_mode">list,form</field> | ||
| </record> | ||
| </odoo> 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.
Please don't forget about the final new line.
| <field name="view_mode">list,form</field> | ||
| <field name="context">{'search_default_filter_available': True}</field> | ||
| </record> | ||
| </odoo> 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.
Hre too
| <field name="domain">[('property_id.property_type_id', '=', active_id)]</field> | ||
| <field name="domain">[('property_id.property_type_id', '=', active_id)]</field> | ||
| </record> | ||
| </odoo> 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.
Here also
| <field name="res_model">estate.property.offer</field> | ||
| <field name="view_mode">list,form</field> | ||
| <field name="domain">[('property_id.property_type_id', '=', active_id)]</field> | ||
| <field name="domain">[('property_id.property_type_id', '=', active_id)]</field> |
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.
Duplicate lines here 😄
| <field name="status" /> | ||
| <button name="action_accept" type="object" icon="fa-check" title="Accept" /> | ||
| <button name="action_refuse" type="object" icon="fa-times" title="Refuse" /> | ||
|
|
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.
Blank lines
e97a713 to
8e85311
Compare

No description provided.