Skip to content

Commit 66a0801

Browse files
committed
[IMP] estate: Models and Basic Fields
Created the Estate Property model and added it to the __init__.py file. Defined the model’s attributes and fields.
1 parent 6e4093e commit 66a0801

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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(string="Description")
9+
postcode = fields.Char(string="Postcode")
10+
date_availability = fields.Date(string="Available From")
11+
expected_price = fields.Float(string="Expected Price", required=True)
12+
selling_price = fields.Float(string="Selling Price")
13+
bedrooms = fields.Integer(string="Bedrooms")
14+
living_area = fields.Integer(string="Living Area (sqm)")
15+
facades = fields.Integer(string="Facades")
16+
garage = fields.Boolean(string="Garage")
17+
garden = fields.Boolean(string="Garden")
18+
garden_area = fields.Integer(string="Total Area (sqm)")
19+
garden_orientation = fields.Selection(
20+
string="Garden Orientation",
21+
selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')],
22+
help="The orientation of the Garden"
23+
)

0 commit comments

Comments
 (0)