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

mcou - Technical Training #58

Closed
wants to merge 28 commits into from
Closed

Conversation

mathcoutant
Copy link

No description provided.

offer_ids = fields.One2many("estate.property.offer", "property_id", string="Offers")
total_area = fields.Integer(compute="_compute_total_area")
best_price = fields.Float(compute="_compute_best_price")
_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(property.state == "canceled"):
raise UserError("Canceled properties cannot be sold.")
continue

Choose a reason for hiding this comment

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

with a raise continue is useless

@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