Skip to content

Commit fee6b56

Browse files
committed
[ADD] Chapter 3
1 parent 48f899f commit fee6b56

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2-
"name": "Real Estate",
3-
"depends": ["base"],
4-
"installable": True,
5-
"application": True,
2+
'name': 'Real Estate',
3+
'depends': ['base'],
4+
'installable': True,
5+
'application': True,
6+
'author': "Odoo",
7+
'license': 'AGPL-3'
68
}

estate/models/__init__.py

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

estate/models/property.py

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

0 commit comments

Comments
 (0)