diff --git a/estate/__init__.py b/estate/__init__.py new file mode 100644 index 00000000000..899bcc97f0f --- /dev/null +++ b/estate/__init__.py @@ -0,0 +1,2 @@ +from . import models + diff --git a/estate/__manifest__.py b/estate/__manifest__.py new file mode 100644 index 00000000000..ca43f1f5527 --- /dev/null +++ b/estate/__manifest__.py @@ -0,0 +1,19 @@ +{ + + "name": "real estate", + "version": "1.0", + "summary": "Estate management", + "description": "Estate management", + "author": "Odoo S.A.", + "website": "https://www.odoo.com/", + "category": "Uncategorized", + "depends": ["base"], + "data":[ + "security/ir.model.access.csv", + "views/estate_property_views.xml" + ], + "license":"LGPL-3", + "application": True, + "installable":True +} + diff --git a/estate/models/__init__.py b/estate/models/__init__.py new file mode 100644 index 00000000000..c5006b18cf8 --- /dev/null +++ b/estate/models/__init__.py @@ -0,0 +1,2 @@ +from . import estate_property + diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py new file mode 100644 index 00000000000..71563ff554f --- /dev/null +++ b/estate/models/estate_property.py @@ -0,0 +1,25 @@ +from odoo import models, fields + +class EstateProperty(models.Model): + _name = "estate.property" + _description = "Real Estate Property" + name = fields.Char(required=True) + description = fields.Text() + postcode = fields.Char() + date_availability = fields.Date() + expected_price = fields.Float() + selling_price = fields.Float(required=True) + bedrooms = fields.Integer() + living_area = fields.Integer() + facades = fields.Integer() + garage = fields.Boolean() + garden = fields.Boolean() + garden_area = fields.Integer() + 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..d48cf7145c0 --- /dev/null +++ b/estate/security/ir.model.access.csv @@ -0,0 +1,3 @@ +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..f3928274bc5 --- /dev/null +++ b/estate/views/estate_property_views.xml @@ -0,0 +1,11 @@ + + + + + Properties + estate.property + list,form + + + +