Skip to content

Commit d337c6c

Browse files
committed
[FIX] real_estate: fixing space error in odoo formate
in this tutorial I get error related to space so i fix that error.
1 parent 567b121 commit d337c6c

16 files changed

+8
-23
lines changed

estate_account/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
'name': "Account",
33
'version': '1.0',
4-
'depends': ['base', 'estate-gasa', 'account'],
4+
'depends': ['base', 'estate_gasa', 'account'],
55
'author': "Author Name",
66
'category': 'Category',
77
"license": "LGPL-3",
File renamed without changes.
File renamed without changes.
File renamed without changes.

estate-gasa/models/estate.py renamed to estate_gasa/models/estate.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,18 @@ def action_mark_cancelled(self):
103103
record.state = 'cancelled'
104104

105105
_sql_constraints = [
106-
('check_expected_price_positive', 'CHECK(expected_price > 0)',
107-
'The expected price must be strictly positive.'),
108-
('check_selling_price_positive', 'CHECK(selling_price >= 0)',
109-
'The selling price must be positive.'),
106+
('check_expected_price_positive', 'CHECK(expected_price > 0)', 'The expected price must be strictly positive.'),
107+
('check_selling_price_positive', 'CHECK(selling_price >= 0)', 'The selling price must be positive.'),
110108
]
111109

112110
@api.constrains('selling_price', 'expected_price')
113111
def _check_selling_price_threshold(self):
114112
for record in self:
115113
if float_is_zero(record.selling_price, precision_digits=2):
116114
continue
117-
115+
118116
minimum_allowed = record.expected_price * 0.9
119-
117+
120118
if float_compare(record.selling_price, minimum_allowed, precision_digits=2) < 0:
121119
raise ValidationError(
122120
("The selling price cannot be lower than 90%% of the expected price.\n"

estate-gasa/models/estate_property_type.py renamed to estate_gasa/models/estate_property_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class EstatePropertyType(models.Model):
1616
]
1717
offer_ids = fields.One2many('estate.property.offer', 'property_type_id', string="Offers")
1818
offer_count = fields.Integer(compute='_compute_offer_count')
19-
19+
2020
@api.depends('offer_ids')
2121
def _compute_offer_count(self):
2222
for rec in self:

0 commit comments

Comments
 (0)