@@ -9,22 +9,37 @@ class EstateModel(models.Model):
9
9
_description = "Real Estate Advertisement Model"
10
10
_order = "id desc"
11
11
12
- name = fields .Char (required = True )
13
- description = fields .Text ()
14
- postcode = fields .Char ()
12
+ active = fields .Boolean (default = True )
13
+ bedrooms = fields .Integer (default = 2 )
14
+ best_price = fields .Float (compute = "_compute_best_price" , store = True , default = 0.0 )
15
+ buyer = fields .Many2one ("res.partner" , readonly = True )
15
16
date_availability = fields .Date (
16
17
copy = False ,
17
18
default = fields .Date .today () + timedelta (days = 90 ),
18
19
)
19
- active = fields .Boolean ( default = True )
20
+ description = fields .Text ( )
20
21
expected_price = fields .Float (required = True )
21
- selling_price = fields .Float (readonly = True , copy = False )
22
- bedrooms = fields .Integer (default = 2 )
23
- living_area = fields .Integer ()
24
22
facades = fields .Integer ()
25
23
garage = fields .Boolean ()
26
24
garden = fields .Boolean ()
27
25
garden_area = fields .Integer ()
26
+ garden_orientation = fields .Selection (
27
+ string = "Garden Orientation" ,
28
+ selection = [
29
+ ("north" , "North" ),
30
+ ("south" , "South" ),
31
+ ("east" , "East" ),
32
+ ("west" , "West" ),
33
+ ],
34
+ help = "Select the direction the garden faces" ,
35
+ )
36
+ living_area = fields .Integer ()
37
+ name = fields .Char (required = True )
38
+ offer_ids = fields .One2many ("estate.property.offer" , inverse_name = "property_id" )
39
+ postcode = fields .Char ()
40
+ property_type_id = fields .Many2one ("estate.property.type" )
41
+ salesman = fields .Many2one ("res.users" )
42
+ selling_price = fields .Float (readonly = True , copy = False )
28
43
state = fields .Selection (
29
44
string = "State" ,
30
45
default = "new" ,
@@ -38,23 +53,8 @@ class EstateModel(models.Model):
38
53
("cancelled" , "Cancelled" ),
39
54
],
40
55
)
41
- garden_orientation = fields .Selection (
42
- string = "Garden Orientation" ,
43
- selection = [
44
- ("north" , "North" ),
45
- ("south" , "South" ),
46
- ("east" , "East" ),
47
- ("west" , "West" ),
48
- ],
49
- help = "Select the direction the garden faces" ,
50
- )
51
- property_type_id = fields .Many2one ("estate.property.type" )
52
- buyer = fields .Many2one ("res.partner" , readonly = True )
53
- salesman = fields .Many2one ("res.users" )
54
56
tag_ids = fields .Many2many ("estate.property.tag" )
55
- offer_ids = fields .One2many ("estate.property.offer" , inverse_name = "property_id" )
56
57
total_area = fields .Float (compute = "_compute_total_area" , store = True )
57
- best_price = fields .Float (compute = "_compute_best_price" , store = True , default = 0.0 )
58
58
59
59
_sql_constraints = [
60
60
(
0 commit comments