Skip to content

Commit 3fc4e6b

Browse files
committed
[FIX] estate: estate_account had import error
-Fixed path of estate_account module.
1 parent 2703918 commit 3fc4e6b

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

estate/models/estate_property.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ class EstateProperty(models.Model):
6868
def _compute_total_area(self):
6969
for record in self:
7070
record.total_area = (record.living_area or 0) + (record.garden_area or 0)
71-
71+
7272
@api.depends("offer_ids.price")
7373
def _compute_best_price(self):
7474
for record in self:
7575
record.best_price = max(record.offer_ids.mapped("price"), default=0)
76-
76+
7777
@api.onchange("garden")
7878
def _onchange_garden(self):
7979
if self.garden:
@@ -82,17 +82,19 @@ def _onchange_garden(self):
8282
else:
8383
self.garden_area = 0
8484
self.garden_orientation = False
85+
8586
def action_cancel(self):
8687
for record in self:
8788
if record.state == "sold":
8889
raise UserError("A sold property cannot be cancelled")
8990
record.state = "cancelled"
91+
9092
def action_sold(self):
9193
for record in self:
9294
if record.state == "cancelled":
9395
raise UserError("A cancelled property cannot be set as sold")
9496
record.state = "sold"
95-
97+
9698
@api.constrains("selling_price", "expected_price")
9799
def _check_selling_price(self):
98100
for record in self:

estate/models/estate_property_offer.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ def _compute_date_deadline(self):
3636
for record in self:
3737
creation_date = record.create_date or fields.Date.today()
3838
record.date_deadline = creation_date + relativedelta(days=record.validity)
39+
3940
def _inverse_date_deadline(self):
4041
for record in self:
4142
creation_date = record.create_date.date() or fields.Date.today()
4243
record.validity = (record.date_deadline - creation_date).days
44+
4345
def action_accept(self):
4446
for record in self:
4547
if record.property_id.buyer_id:
@@ -48,6 +50,7 @@ def action_accept(self):
4850
record.property_id.selling_price = record.price
4951
record.property_id.state = 'offer_accepted'
5052
record.property_id.buyer_id = record.partner_id
53+
5154
def action_refuse(self):
5255
self.status = 'refused'
5356
return True
@@ -69,9 +72,8 @@ def create(self, vals):
6972
("price", ">=", max_new_price),
7073
], limit=1)
7174
if existing_offers:
72-
raise UserError(
73-
"You cannot create an offer with a lower amount than an existing offer for this property."
74-
)
75+
raise UserError("You cannot create an offer with a lower amount than an existing offer for this property.")
76+
7577
records = super().create(vals)
7678
if isinstance(records, models.Model):
7779
for offer in records:

estate/models/estate_property_tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ class EstatePropertyTag(models.Model):
77
_order = "name"
88
name = fields.Char(required=True)
99
color = fields.Integer()
10-
10+
1111
_check_tag_name_unique = models.Constraint(
12-
'UNIQUE(name)',
12+
'UNIQUE(name)',
1313
'The name of the property tag must be unique.'
1414
)

estate/models/res_users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
class InheritedModel(models.Model):
55
_inherit = "res.users"
6-
property_ids=fields.One2Many("estate.property","salesperson_id",domain=[("state","!=","sold")], string="Properties")
6+
property_ids = fields.One2Many("estate.property", "salesperson_id", domain=[("state", "!=", "sold")], string="Properties")

estate_account/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
'application': True,
44
'installable': True,
55
'author': 'Odoo S.A.',
6-
'license': 'LGPL-3'
7-
'depends': ['estate', 'account'],
6+
'license': 'LGPL-3',
7+
'depends': ['estate','account']
88
}

0 commit comments

Comments
 (0)