File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ from . import models
Original file line number Diff line number Diff line change 1+ from . import estate_property
Original file line number Diff line number Diff line change 1+ from odoo import fields , models
2+
3+ class Property (models .Model ):
4+ _name = "estate.property"
5+ _description = "This is a estate property"
6+ _order = "sequence"
7+
8+ name = fields .Char ('Name' , required = True )
9+ description = fields .Text ('Description' )
10+ postcode = fields .Char ('Postcode' )
11+ date_availability = fields .Date ('Available From' , copy = False )
12+
13+ expected_price = fields .Float ('Expected Price' , required = True )
14+ selling_price = fields .Float ('Selling Price' , readonly = True , copy = False )
15+
16+ bedrooms = fields .Integer ('Bedrooms' , default = 2 )
17+ living_area = fields .Integer ('Living Area (sqm)' )
18+ facades = fields .Integer ('Number of Facades' )
19+
20+ garage = fields .Boolean ('Garage' )
21+ garden = fields .Boolean ('Garden' )
22+ garden_area = fields .Integer ('Garden Area (sqm)' )
23+ garden_orientation = fields .Selection (
24+ selection = [
25+ ('north' , 'North' ),
26+ ('south' , 'South' ),
27+ ('east' , 'East' ),
28+ ('west' , 'West' ),
29+ ],
30+ string = 'Garden Orientation'
31+ )
32+
33+ active = fields .Boolean ('Active' , default = True )
34+
You can’t perform that action at this time.
0 commit comments