Skip to content

Commit cb8613b

Browse files
committed
[ADD] real_estate: created a new module
Added a new 'real estate' module, created the database, and defined necessary columns.
1 parent b68a192 commit cb8613b

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
'name': 'Real Estate',
3+
'depends': ['base'],
4+
}

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 models,fields
2+
3+
class estateproperty(models.Model):
4+
_name = "estate.property"
5+
_description = "Real 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", readonly=True)
13+
bedrooms = fields.Integer(string="Bedrooms", default=2)
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="Garden Area (sqm)")
19+
garden_orientation = fields.Selection(
20+
selection=[('north', 'North'),('south', 'South'),('east', 'East'),('west', 'West')],
21+
string="Garden Orientation"
22+
)
23+
active = fields.Boolean(string="Active", default=True)

0 commit comments

Comments
 (0)