Skip to content

Commit bf23506

Browse files
author
odoo
committed
Finish the second chapter
1 parent 68406c4 commit bf23506

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

estate/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- coding: utf-8 -*-
2+
# Part of Odoo. See LICENSE file for full copyright and licensing details.
3+
4+
from . import models

estate/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- coding: utf-8 -*-
2+
# Part of Odoo. See LICENSE file for full copyright and licensing details.
3+
4+
from . import estate_property

estate/models/estate_property.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- coding: utf-8 -*-
2+
# Part of Odoo. See LICENSE file for full copyright and licensing details.
3+
4+
from odoo import fields, models
5+
6+
7+
class EstateProperty(models.Model):
8+
_name = "estate.property"
9+
_description = "Real Estate Property"
10+
11+
name = fields.Char(required=True)
12+
description = fields.Text()
13+
postcode = fields.Char()
14+
date_availability = fields.Date()
15+
expected_price = fields.Float()
16+
selling_price = fields.Float()
17+
bedrooms = fields.Integer()
18+
living_area = fields.Integer()
19+
facades = fields.Integer()
20+
garage = fields.Boolean()
21+
garden = fields.Boolean()
22+
garden_area = fields.Integer()
23+
garden_orientation = fields.Selection(
24+
selection=[
25+
('north', 'North'),
26+
('south', 'South'),
27+
('east', 'East'),
28+
('west', 'West')
29+
]
30+
)

0 commit comments

Comments
 (0)