Skip to content

Commit 291e43d

Browse files
committed
[ADD] estate: create a real estate app with basic models using Object relational mapping.
Key changes include: - Defined core model (estate.property) - Created `__init__.py` and `__manifest__.py` - Added name and required dependencies of our module in `__manifest__.py` - Added field declarations for estate.property This commit lays the foundation for a functional real estate management system in Odoo.
1 parent fbf9ee9 commit 291e43d

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
'name': "Real Estate",
3+
'description': """Real Estate Application.""",
4+
'summary': """Real Estate Application for beginner.""",
5+
'depends': ['base'],
6+
'author': "Aaryan Parpyani (aarp)",
7+
'category': "Tutorials/RealEstate",
8+
'version': '1.0',
9+
'application': True,
10+
'installable': True,
11+
}

estate/models/__init__.py

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

estate/models/estate_property.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from odoo import fields, models
2+
3+
class EstateProperty(models.Model):
4+
_name = "estate.property"
5+
_description = "Estate Test"
6+
7+
name = fields.Char(string="Title")
8+
description = fields.Text()
9+
postcode = fields.Char()
10+
date_availability = fields.Date()
11+
expected_price = fields.Float()
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+
[
21+
('north', 'North'),
22+
('south', 'South'),
23+
('east', 'East'),
24+
('west', 'West')
25+
],
26+
string="Garden Orientation"
27+
)

0 commit comments

Comments
 (0)