Skip to content

Commit 158ef20

Browse files
committed
[IMP] estate: real estate properties model definition
1 parent 5938937 commit 158ef20

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

estate/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

estate/models/estate_property.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1-
from odoo import models
1+
from odoo import fields, models
22

33

44
class Property(models.Model):
55
_name = "estate.property"
6+
_description = "Real Estate application"
7+
8+
name = fields.Char('Name', required=True)
9+
description = fields.Text('Description')
10+
postcode = fields.Float('Postcode')
11+
date_availability = fields.Date('Date availability')
12+
expected_price = fields.Float('Expected price', required=True)
13+
selling_price = fields.Float('Selling price')
14+
bedrooms = fields.Integer('Bedrooms')
15+
living_area = fields.Integer('Living area')
16+
facades = fields.Integer('Facades')
17+
garage = fields.Boolean('Garage')
18+
garden = fields.Boolean('Garden')
19+
garden_area = fields.Integer('Garden area')
20+
garden_orientation = fields.Selection([
21+
('north', 'North'),
22+
('south', 'South'),
23+
('east', 'East'),
24+
('west', 'West'),
25+
], string='Garden Orientation')

0 commit comments

Comments
 (0)