Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added estate/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions estate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
'name': "Estate",
'version': '1.0',
'depends': ['base'],
'author': "GACI Jugurtha (jugac)",
'application': True,
'data': [
'data/ir.model.access.csv'
]
}
2 changes: 2 additions & 0 deletions estate/data/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_estate_property_user,access.estate.property.user,model_estate_property,base.group_user,1,1,1,1
27 changes: 27 additions & 0 deletions estate/models/estate_property.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from odoo import models, fields

class EstateProperty(models.model):
_name = "estate_property"
_description = "Table that stores the estate properties"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_description = "Table that stores the estate properties"
_description = "Estate Property"

_description is the human-readable name of the model, not an actual description. It' a misnomer.


name = fields.Char(string="Title", required=True)
description = fields.Text(string="Description")
postcode = fields.Char(string="Postcode")

date_availability = fields.Date(string="Available From")
expected_price = fields.Float(string="Expected price", required=True)
selling_price = fields.Float(string="Selling price")
bedrooms = fields.Integer(string="Bedrooms")
living_area = fields.Integer(string="Living Arez (sqm)")
facades = fields.Integer(string="Facades")
garage = fields.Boolean(string="Garage")
garden = fields.Boolean(string="Garden")
garden_area = fields.Integer()
garden_orientation = fields.Selection(
selection=[
('north', 'North'),
('south', 'South'),
('east', 'East'),
('west', 'West')
]
)