Skip to content

Commit e5b226b

Browse files
author
Gaso
committed
[FIX] style ci
1 parent a683aff commit e5b226b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

estate/models/estate_property.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Estate_property(models.Model):
88
_order = "id desc"
99

1010
name = fields.Char(string="Name", required=True)
11-
description = fields.Text()
11+
description = fields.Text()
1212
postcode = fields.Char()
1313
date_availability = fields.Datetime(copy=False, default=fields.date.today() + relativedelta(months=3))
1414
expected_price = fields.Float(required=True)
@@ -21,7 +21,7 @@ class Estate_property(models.Model):
2121
garden_area = fields.Integer()
2222
garden_orientation = fields.Selection(
2323
string='Orientation',
24-
selection=[('north', 'North'), ('south', 'South'), ('east','East'), ('west', 'West')],
24+
selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')],
2525
help="Orientation is meant to describe the garden."
2626
)
2727
active = fields.Boolean('Active', default=True)
@@ -83,9 +83,7 @@ def has_accepted_offer(self):
8383
@api.onchange("expected_price")
8484
def _onchange_expected_price(self):
8585
if (self.has_accepted_offer()):
86-
compute_cost = self.expected_price *90/100
87-
print(compute_cost)
88-
if (tools.float_utils.float_compare(compute_cost, self.selling_price, 2) > 0):
86+
if (tools.float_utils.float_compare(self.expected_price * 90 / 100, self.selling_price, 2) > 0):
8987
raise exceptions.ValidationError("The selling price must be equal or higher than 90% of the selling price.")
9088

9189
@api.ondelete(at_uninstall=False)

estate/models/estate_property_offer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def accept_offer(self):
3636
for record in self:
3737
if (record.property_id.has_accepted_offer()):
3838
raise exceptions.UserError("Only one Offer can be accepted")
39-
if (tools.float_utils.float_compare(record.property_id.expected_price *90/100, record.price, 2) > 0):
39+
if (tools.float_utils.float_compare(record.property_id.expected_price * 90 / 100, record.price, 2) > 0):
4040
raise exceptions.ValidationError("You can't accept an offer lower than 90% of the selling price.")
4141
record.status = "accepted"
4242
record.property_id.selling_price = record.price

0 commit comments

Comments
 (0)