33
44
55class EstateProperty (models .Model ):
6- _name = 'estate_property '
6+ _name = 'estate.property '
77 _description = "Real Estate Property"
88
99 name = fields .Char (required = True )
@@ -18,22 +18,26 @@ class EstateProperty(models.Model):
1818 garage = fields .Boolean ()
1919 garden = fields .Boolean ()
2020 garden_area = fields .Integer (string = "Garden Area (sqm)" )
21- garden_orientation = fields .Selection (
22- string = ' Garden Orientation' ,
21+ garden_orientation = fields .Selection (
22+ string = " Garden Orientation" ,
2323 selection = [('north' , 'North' ),
2424 ('south' , 'South' ),
25- ('east' ,'East' ),
26- ('west' ,'West' )
25+ ('east' , 'East' ),
26+ ('west' , 'West' )
2727 ]
2828 )
29- active = fields .Boolean (default = False )
30- state = fields .Selection (
29+ active = fields .Boolean (default = False )
30+ state = fields .Selection (
3131 selection = [
32- ('new' ,'New' ),
33- ('offer_received' ,'Offer Received' ),
34- ('offer_accepted' ,'Offer Accepted' ),
35- ('sold' ,'Sold' ),
36- ('cancelled' ,'Cancelled' )
32+ ('new' , 'New' ),
33+ ('offer_received' , 'Offer Received' ),
34+ ('offer_accepted' , 'Offer Accepted' ),
35+ ('sold' , 'Sold' ),
36+ ('cancelled' , 'Cancelled' )
3737 ]
3838 )
39-
39+ property_type_id = fields .Many2one ("estate.property.type" )
40+ buyer = fields .Many2one ("res.partner" , copy = False )
41+ salesperson = fields .Many2one ("res.users" )
42+ tag_ids = fields .Many2many ("estate.property.tag" )
43+ offer_ids = fields .One2many ("estate.property.offer" , "property_id" , string = "Offers" )
0 commit comments