Skip to content

Commit 42f72a9

Browse files
committed
[ADD] estate: defined estate property model
. Create a model for properties with basic info, availability, and pricing. . Include structural details and amenities like garden size and orientation. . Require key fields such as name and expected price. . Ensure data is saved properly via the ORM.
1 parent 6b97ae5 commit 42f72a9

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-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/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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from odoo import models, fields
2+
3+
class EstateModel(models.Model):
4+
_name = "estate.property"
5+
_description = "Real Estate Advertisement Model"
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+
string='Type',
21+
selection=[('north', 'North'),('south', 'South'),('east', 'East'),('west', 'West')],
22+
)

0 commit comments

Comments
 (0)