Skip to content

Commit 8b7fedd

Browse files
committed
[LINT] estate: code polishing 2nd pass
1 parent 1261527 commit 8b7fedd

5 files changed

Lines changed: 6 additions & 5 deletions

File tree

estate/models/estate_property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class EstateProperty(models.Model):
4141
('offer_accepted', 'Offer Accepted'),
4242
('sold', 'Sold'),
4343
('canceled', 'Canceled')
44-
],
44+
],
4545
default='new',
4646
required=True,
4747
copy=False,
@@ -82,7 +82,7 @@ def _check_selling_above_90(self):
8282
for offer in record.offer_ids:
8383
if offer.status == 'accepted':
8484
offer_accepted = True
85-
compare = tools.float_utils.float_compare(record.selling_price, record.expected_price*0.9, precision_digits=2)
85+
compare = tools.float_utils.float_compare(record.selling_price, record.expected_price * 0.9, precision_digits = 2)
8686
if offer_accepted and compare != 1:
8787
raise exceptions.ValidationError("Cannot sell bellow 90% of expected price!")
8888

estate/models/estate_property_offer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class EstatePropertyOffer(models.Model):
2929
def _compute_deadline(self):
3030
for record in self:
3131
record.date_deadline = record.date_create + timedelta(days=record.validity)
32-
32+
3333
def _inverse_deadline(self):
3434
for record in self:
3535
record.validity = (record.date_deadline - record.date_create).days

estate/models/res_users.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from odoo import models, fields
22

3+
34
class ResUsers(models.Model):
45
_inherit = "res.users"
56

estate_account/models/estate_account_invoice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ def action_view_property(self):
1515
'view_mode': 'form',
1616
'res_id': self.property_id.id,
1717
'target': 'current',
18-
}
18+
}

estate_account/models/estate_account_property.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def property_set_sold(self):
1818
Command.create({
1919
"name": "Deposit (6%)",
2020
"quantity": 1,
21-
"price_unit": record.selling_price*0.06
21+
"price_unit": record.selling_price * 0.06
2222
}),
2323
Command.create({
2424
"name": "Admin fees",

0 commit comments

Comments
 (0)