@@ -7,34 +7,43 @@ class EstateProperty(models.Model):
77 _description = "Real Estate Property"
88
99 name = fields .Char (required = True )
10- description = fields .Text ("Description" )
11- postcode = fields .Char ("Postcode" , required = True )
12- date_availability = fields .Date ("Availability Date" , default = fields .Date .today ()+ relativedelta (months = 3 ))
13- expected_price = fields .Float (required = True )
10+ description = fields .Text ()
11+ postcode = fields .Char ()
12+ date_availability = fields .Date ("Availability Date" , default = fields .Date .today () + relativedelta (months = 3 ))
13+ expected_price = fields .Float ("Expected Price" , required = True )
1414 selling_price = fields .Float ("Selling Price" , readonly = True )
15- bedrooms = fields .Integer ("Bedrooms" , default = 2 )
16- living_area = fields .Integer ("living_area(sqm)" )
17- facades = fields .Integer ("Facades" )
18- garage = fields .Boolean ("Garage" )
19- garden = fields .Boolean ("Garden" )
20- garden_area = fields .Integer ("Garden Area sqm" )
21- garden_orientation = fields .Selection ([
22- ('north' , 'North' ),
23- ('south' , 'South' ),
24- ('east' , 'East' ),
25- ('west' , 'West' ),
26- ])
15+ bedrooms = fields .Integer (default = 2 )
16+ living_area = fields .Integer ("Living Area(sqm)" )
17+ facades = fields .Integer ()
18+ garage = fields .Boolean ()
19+ garden = fields .Boolean ()
20+ garden_area = fields .Integer ("Garden Area(sqm)" )
21+ garden_orientation = fields .Selection (
22+ selection = [
23+ ("north" , "North" ),
24+ ("south" , "South" ),
25+ ("east" , "East" ),
26+ ("west" , "West" ),
27+ ],
28+ string = "Garden Orientation" ,
29+ )
2730 state = fields .Selection (
2831 [
29- (' new' , ' New' ),
30- (' offer_received' , ' Offer Received' ),
31- (' offer_accepted' , ' Offer Accepted' ),
32- (' sold' , ' Sold' ),
33- ('canceled' , 'Canceled' ),
32+ (" new" , " New" ),
33+ (" offer_received" , " Offer Received" ),
34+ (" offer_accepted" , " Offer Accepted" ),
35+ (" sold" , " Sold" ),
36+ ("cancelled" , "Cancelled" ),
3437 ],
3538 string = "Status" ,
3639 required = True ,
3740 copy = False ,
38- default = ' new'
41+ default = " new" ,
3942 )
40-
43+ active = fields .Boolean (default = True )
44+ property_type_id = fields .Many2one ("estate.property.type" , string = "Property Type" )
45+ buyer_id = fields .Many2one ("res.partner" , string = "Buyer" , copy = False )
46+ salesperson_id = fields .Many2one (
47+ "res.users" , string = "Salesperson" )
48+ tag_ids = fields .Many2many ("estate.property.tag" , string = "Tags" )
49+ offer_ids = fields .One2many ("estate.property.offer" , "property_id" , string = "Offers" )
0 commit comments