2
2
from dateutil .relativedelta import relativedelta
3
3
4
4
class EstateProperty (models .Model ):
5
+
5
6
_name = "estate.property"
6
7
_description = "estate properties"
7
8
_order = "id"
8
9
9
10
name = fields .Char ("Title" , required = True )
10
11
description = fields .Text ("Description" )
11
12
postcode = fields .Char ("Postcode" )
12
- date_availability = fields .Date ("Available From" , default = (fields .Date .today ()+ relativedelta (months = 3 )))
13
+ date_availability = fields .Date ("Available From" , default = (fields .Date .today () + relativedelta (months = 3 )))
13
14
expected_price = fields .Float ("Expected Price" , required = True )
14
15
selling_price = fields .Float ("Selling Price" , readonly = True , copy = False )
15
16
bedrooms = fields .Integer ("Bedrooms" , default = 2 )
@@ -20,10 +21,10 @@ class EstateProperty(models.Model):
20
21
garden_area = fields .Integer ("Garden Area (sqm)" )
21
22
garden_orientation = fields .Selection (
22
23
string = "Garden Orientation" ,
23
- selection = [('north' ,"North" ),('south' ,"South" ),('east' ,"East" ),('west' ,"West" )]
24
+ selection = [('north' ,"North" ), ('south' ,"South" ), ('east' ,"East" ), ('west' ,"West" )]
24
25
)
25
26
26
- active = fields .Boolean ("Active" , default = True )
27
+ active = fields .Boolean ("Active" , default = True )
27
28
28
29
state = fields .Selection (
29
30
selection = [
@@ -37,4 +38,4 @@ class EstateProperty(models.Model):
37
38
required = True ,
38
39
copy = False ,
39
40
default = "new" ,
40
- )
41
+ )
0 commit comments