Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
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
15 changes: 15 additions & 0 deletions estate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
'name': 'estate',
'version': '1.0',
'depends': ['base'],
'category': 'tutorials',
'author': "sadeo-odoo",
'license': 'LGPL-3',
'description': 'A real estate module',
'installable': True,
'application': True,
'data':[
'security/ir.model.access.csv',
'views/estate_property_views.xml',
]
}
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 estate_property
26 changes: 26 additions & 0 deletions estate/models/estate_property.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from odoo import fields,models

class EstateProperty(models.Model):
_name='estate.property'
_descripion='Estate Property description modulee'
name=fields.Char(string='Name',required=True)
description=fields.Text(string='Description')
bedrooms=fields.Integer(string='Bedrooms')
price = fields.Float(string='Price')
garden = fields.Boolean(string='Garden')
postcode = fields.Char(string='Postal Code')
date_available = fields.Date(string='Available Date')
expected_price = fields.Float(string='Expected Price')
selling_price = fields.Float(string='Selling Price',required=True)
meeting_time = fields.Datetime(string='Meeting')
living_area = fields.Integer(string='Living Area')
facades = fields.Integer(string='Facades')
garage = fields.Boolean(string='Garage')
garden = fields.Boolean(string='Garden')
garden_area = fields.Integer(string='Garden Area')
garden_orientation=fields.Selection(
[
('north','North'),('south','South'),('east','East'),('west','West')
]
)

2 changes: 2 additions & 0 deletions estate/security/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,access_estate_property,model_estate_property,base.group_user,1,1,1,1
7 changes: 7 additions & 0 deletions estate/views/estate_property_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<odoo>
<record id="estate_property_action" model="ir.actions.act_window">
<field name="name">Estate Properties</field>
<field name="res_model">estate.property</field>
<field name="view_mode">list,form</field>
</record>
</odoo>