11from odoo import fields , models
22
3+
34class EstateProperty (models .Model ):
45 _name = "estate.property"
56 _description = "Real-estate property"
67
78 name = fields .Char (required = True )
89 description = fields .Text ()
910 postcode = fields .Char ()
10- date_availability = fields .Date (copy = False , default = fields .Date .add (fields .Date .today (), months = 3 ))
11+ date_availability = fields .Date (
12+ copy = False , default = fields .Date .add (fields .Date .today (), months = 3 )
13+ )
1114 expected_price = fields .Float (required = True )
1215 selling_price = fields .Float (readonly = True , copy = False )
1316 bedrooms = fields .Integer (default = 2 )
@@ -19,10 +22,23 @@ class EstateProperty(models.Model):
1922 active = fields .Boolean (default = True )
2023 state = fields .Selection (
2124 required = True ,
22- default = ' New' ,
25+ default = " New" ,
2326 copy = False ,
24- selection = [('New' , 'new' ), ('Offer Received' , 'offer received' ), ('Offer Accepted' , 'offer accepted' ), ('Sold' , 'sold' ), ('Cancelled' , 'cancelled' )])
27+ selection = [
28+ ("New" , "new" ),
29+ ("Offer Received" , "offer received" ),
30+ ("Offer Accepted" , "offer accepted" ),
31+ ("Sold" , "sold" ),
32+ ("Cancelled" , "cancelled" ),
33+ ],
34+ )
2535 garden_orientation = fields .Selection (
26- string = 'Type' ,
27- selection = [('North' , 'north' ), ('South' , 'south' ), ('East' , 'east' ), ('West' , 'west' )])
36+ string = "Type" ,
37+ selection = [
38+ ("North" , "north" ),
39+ ("South" , "south" ),
40+ ("East" , "east" ),
41+ ("West" , "west" ),
42+ ],
43+ )
2844
0 commit comments