Skip to content

Commit 81cf327

Browse files
committed
[ADD] (Chapter 3) estate: add initial estate module structure
Introduces the basic scaffolding for the new real estate module. - Creates the module initialization files ( __init__). - Adds the first 'estate.property' model definition. - Includes the initial set of base fields for the model.
1 parent 8e80e5a commit 81cf327

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
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/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
}
1111

1212

13+

estate/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from . import estate_property
2+
3+
4+

estate/models/estate_property.py

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

0 commit comments

Comments
 (0)