Skip to content

Commit db23143

Browse files
committed
[CLN] estate: stylistic correction
1 parent dad4685 commit db23143

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

estate/__manifest__.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
{'name': 'Real Estate',
2-
'depends': ['base'],
3-
'data': ['security/ir.model.access.csv',
4-
'views/estate_property_views.xml',
5-
'views/estate_menus.xml'],
6-
'application': True,
7-
'author': 'leker',
8-
'license': 'LGPL-3',
1+
{
2+
'name': 'Real Estate',
3+
'depends': ['base'],
4+
'data': ['security/ir.model.access.csv',
5+
'views/estate_property_views.xml',
6+
'views/estate_menus.xml'],
7+
'application': True,
8+
'author': 'leker',
9+
'license': 'LGPL-3',
910
}

estate/models/estate_property.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,22 @@ class Property(models.Model):
55
_name = "estate.property"
66
_description = "Real Estate application"
77

8-
name = fields.Char('Name', required=True)
8+
name = fields.Char('Name', required=True, default='Unknown')
99
description = fields.Text('Description')
1010
postcode = fields.Float('Postcode')
11-
date_availability = fields.Date('Date availability')
11+
date_availability = fields.Date('Date availability', copy=False)
12+
last_seen = fields.Datetime("Last Seen", default=fields.Datetime.now)
1213
expected_price = fields.Float('Expected price', required=True)
13-
selling_price = fields.Float('Selling price')
14-
bedrooms = fields.Integer('Bedrooms')
14+
selling_price = fields.Float('Selling price', readonly=True, copy=False)
15+
bedrooms = fields.Integer('Bedrooms', default=2)
1516
living_area = fields.Integer('Living area')
1617
facades = fields.Integer('Facades')
1718
garage = fields.Boolean('Garage')
1819
garden = fields.Boolean('Garden')
1920
garden_area = fields.Integer('Garden area')
20-
garden_orientation = fields.Selection(string='Garden Orientation',
21-
selection=[('north', 'North'), ('south', 'South'), ('est', 'Est'), ('west', 'West')])
21+
garden_orientation = fields.Selection([
22+
('north', 'North'),
23+
('south', 'South'),
24+
('east', 'East'),
25+
('west', 'West'),
26+
], string='Garden Orientation')

0 commit comments

Comments
 (0)