-
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
| 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 ?
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.
that function is called when that field calculated
offer_count = fields.Integer(compute='_compute_offer_count', string="Offer Count")
so, there is no need for any dependency
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.
Yeah but I think you still need to add a dependency as if property_ids change it is not recomputed.
e97a713 to
8e85311
Compare
…tion with automatic invoice generation
d6f0df1 to
9c4e958
Compare
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.
Did another review.
| 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.
Yeah but I think you still need to add a dependency as if property_ids change it is not recomputed.
| if not float_is_zero(property.selling_price, precision_digits=2): | ||
| if float_compare(property.selling_price, property.expected_price * 0.9, precision_digits=2) < 0: |
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 doing two conditions ?
| if not float_is_zero(property.selling_price, precision_digits=2): | |
| if float_compare(property.selling_price, property.expected_price * 0.9, precision_digits=2) < 0: | |
| if not float_is_zero(property.selling_price, precision_digits=2) and float_compare(property.selling_price, property.expected_price * 0.9, precision_digits=2) < 0: |
| if offer.property_id.offer_ids.filtered(lambda o: o.status == 'accepted' and o.id != offer.id): | ||
| raise UserError(self.env._("Only one offer can be accepted per property.")) |
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.
Can you not check the state of the property directly, instead of doing a filtering ?
| /* Estate Module Kanban View Styles */ | ||
|
|
||
| .o_kanban_record_title { | ||
| font-size: 16px; | ||
| font-weight: bold; | ||
| margin-bottom: 8px; | ||
| color: #212529; | ||
| } | ||
|
|
||
| .o_kanban_record_subtitle { | ||
| font-size: 13px; | ||
| color: #6c757d; | ||
| margin-bottom: 4px; | ||
| } | ||
|
|
||
| .o_kanban_tags_section { | ||
| margin-top: 8px; | ||
| } |
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 at least put your module name to avoid collision with the rest of the css from odoo
| ( | ||
| 0, | ||
| 0, | ||
| { | ||
| 'name': 'Property price', | ||
| 'quantity': 1, | ||
| 'price_unit': property.selling_price, | ||
| }, | ||
| ), |
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 you could use Command.create from odoo.
| "data": [], | ||
| "application": False, | ||
| "license": "LGPL-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.
Don't forget to add auto_install here so your bridge module is auto installed when all dependencies are installed.

No description provided.