Skip to content

Commit

Permalink
Chapter 3
Browse files Browse the repository at this point in the history
  • Loading branch information
“gito-odoo” committed Apr 16, 2024
1 parent e9a8e2c commit 7cdfb7a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions estate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
1 change: 1 addition & 0 deletions estate/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import property
21 changes: 21 additions & 0 deletions estate/models/property.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from odoo import fields, models

class Property(models.Model):
_name = "estate.property"
_description = "Estate properties"

name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Char()
date_availability = fields.Date()
expected_price = fields.Float(required=True)
selling_price = fields.Float()
bedrooms = fields.Integer()
living_area = fields.Integer()
facades = fields.Integer()
garage = fields.Boolean()
garden = fields.Boolean()
garden_area = fields.Integer()
garden_orientation = fields.Selection(
selection=[('north', 'North'), ('south', 'South'), ('east', 'east'), ('west', 'West')]
)

0 comments on commit 7cdfb7a

Please sign in to comment.