Skip to content
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

Closed
wants to merge 29 commits into from

Conversation

Atovange
Copy link

No description provided.

@Atovange Atovange force-pushed the 17.0-technical-training-gito branch from 68635a6 to 7cdfb7a Compare April 16, 2024 09:52
total_area = fields.Float(string="Total Area (sqm)", compute="_compute_total_area")
best_offer = fields.Float(compute="_compute_best_offer")

_sql_constraints = [

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

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:

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

validity = fields.Integer(default=7)
date_deadline = fields.Date(compute="_compute_deadline", inverse="_inverse_deadline")

sql_constraints = [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sql_constraints = [
_sql_constraints = [

@Atovange Atovange force-pushed the 17.0-technical-training-gito branch from f8acfdd to 905eb07 Compare April 18, 2024 07:55
@AntoineVDV AntoineVDV closed this May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants