Skip to content

Commit 2ac0593

Browse files
committed
[IMP] estate: add model estate_property
Framework 101 tutorial: chapter 3
1 parent 3d50ff2 commit 2ac0593

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

estate/models/estate_property.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from odoo import fields, models
2+
3+
class EstateProperty(models.Model):
4+
_name = "estate.property"
5+
_description = "Estate property"
6+
7+
name = fields.Char(required=True)
8+
description = fields.Text()
9+
postcode = fields.Char()
10+
date_availability = fields.Date()
11+
expected_price = fields.Float(required=True)
12+
selling_price = fields.Float()
13+
bedrooms = fields.Integer()
14+
living_area = fields.Integer()
15+
facades = fields.Integer()
16+
garage = fields.Boolean()
17+
garden = fields.Boolean()
18+
garden_area = fields.Integer()
19+
garden_orientation = fields.Selection(
20+
selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')]
21+
)

0 commit comments

Comments
 (0)