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
gito - Technical Training #57
Conversation
68635a6
to
7cdfb7a
Compare
estate/models/property.py
Outdated
total_area = fields.Float(string="Total Area (sqm)", compute="_compute_total_area") | ||
best_offer = fields.Float(compute="_compute_best_offer") | ||
|
||
_sql_constraints = [ |
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.
put your constraint at the top of your class, after _description
estate/models/property.py
Outdated
for property in self: | ||
if float_utils.float_is_zero(property.selling_price, precision_digits=2): | ||
continue | ||
if float_utils.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.
Not 2 if.
if ( bool(x) and bool(y) ):
raise blablabla
estate/models/property_offer.py
Outdated
validity = fields.Integer(default=7) | ||
date_deadline = fields.Date(compute="_compute_deadline", inverse="_inverse_deadline") | ||
|
||
sql_constraints = [ |
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.
sql_constraints = [ | |
_sql_constraints = [ |
f8acfdd
to
905eb07
Compare
No description provided.