diff --git a/estate/__init__.py b/estate/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/estate/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/estate/__manifest__.py b/estate/__manifest__.py new file mode 100644 index 00000000000..ca66b80832f --- /dev/null +++ b/estate/__manifest__.py @@ -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', + ] +} diff --git a/estate/models/__init__.py b/estate/models/__init__.py new file mode 100644 index 00000000000..5e1963c9d2f --- /dev/null +++ b/estate/models/__init__.py @@ -0,0 +1 @@ +from . import estate_property diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py new file mode 100644 index 00000000000..1c1c4e667fc --- /dev/null +++ b/estate/models/estate_property.py @@ -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') + ] + ) + diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv new file mode 100644 index 00000000000..32389642d4f --- /dev/null +++ b/estate/security/ir.model.access.csv @@ -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 diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml new file mode 100644 index 00000000000..09424ecba91 --- /dev/null +++ b/estate/views/estate_property_views.xml @@ -0,0 +1,7 @@ + + + Estate Properties + estate.property + list,form + +