Skip to content

Commit 04713dc

Browse files
committed
[ADD] estate: add an estate module
This adds an estate module that can be used to manage advertisements and offers for different real estate properties as part of the "Sever framework 101" tutorial
1 parent fbf9ee9 commit 04713dc

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

estate/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# -*- coding: utf-8 -*-
2+
from . import models

estate/__manifest__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
{
3+
'name': "E-State!",
4+
5+
'summary': """
6+
Manage real estate advertisements
7+
""",
8+
9+
'description': """
10+
Manage advertisements and offers for different real estate properties as part of the "Sever framework 101" tutorial
11+
""",
12+
13+
'author': "mamr",
14+
'version': '0.1',
15+
'application': True,
16+
'installable': True,
17+
'depends': ['base'],
18+
19+
'license': 'AGPL-3'
20+
}

estate/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# -*- coding: utf-8 -*-
2+
from . import estate_property

estate/models/estate_property.py

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

0 commit comments

Comments
 (0)