From 3b577c345844ff7e24089fcb478dc0d36b514963 Mon Sep 17 00:00:00 2001 From: Mauryan Kansara Date: Thu, 2 Jul 2026 17:47:08 +0530 Subject: [PATCH 1/5] [ADD] estate: create initial real-estate module --- estate/__init__.py | 0 estate/__manifest__.py | 9 +++++++++ 2 files changed, 9 insertions(+) create mode 100644 estate/__init__.py create mode 100644 estate/__manifest__.py diff --git a/estate/__init__.py b/estate/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/estate/__manifest__.py b/estate/__manifest__.py new file mode 100644 index 00000000000..fddbfb4d77d --- /dev/null +++ b/estate/__manifest__.py @@ -0,0 +1,9 @@ +{ + "name": "Real Estate", + "version": "1.0", + "author": "Mauryan Kansara", + "category": "Tutorials", + "depends": ["base"], + "application": True, + "installable": True +} \ No newline at end of file From 58a5d9eef848db8e75bbd841ab99341b6c6995d0 Mon Sep 17 00:00:00 2001 From: Mauryan Kansara Date: Fri, 3 Jul 2026 11:17:31 +0530 Subject: [PATCH 2/5] [FIX] estate: added missing license in __manifest__.py --- estate/__manifest__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index fddbfb4d77d..2bd2fa297e4 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -1,9 +1,10 @@ { "name": "Real Estate", "version": "1.0", + "license": "LGPL-3", "author": "Mauryan Kansara", "category": "Tutorials", "depends": ["base"], "application": True, "installable": True -} \ No newline at end of file +} From a54816b3b4dd30877bf3255f3f7d250f0d6d2c6d Mon Sep 17 00:00:00 2001 From: Mauryan Kansara Date: Fri, 3 Jul 2026 12:38:13 +0530 Subject: [PATCH 3/5] [IMP] estate: added estate_property model --- estate/__init__.py | 1 + estate/models/__init__.py | 1 + estate/models/estate_property.py | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 estate/models/__init__.py create mode 100644 estate/models/estate_property.py diff --git a/estate/__init__.py b/estate/__init__.py index e69de29bb2d..0650744f6bc 100644 --- a/estate/__init__.py +++ b/estate/__init__.py @@ -0,0 +1 @@ +from . import models 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..9bb2d528b6b --- /dev/null +++ b/estate/models/estate_property.py @@ -0,0 +1,21 @@ +from odoo import models, fields + +class EstateProperty(models.Model): + _name = "estate.property" + _description = "Real Estate properties" + + name = fields.Char(required=True) + description = fields.Text() + postcode = fields.Char() + date_availability = fields.Date() + expected_price = fields.Float(reuired=True) + selling_price = fields.Float() + bedrooms = fields.Integer() + living_area = fields.Integer() + facades = fields.Integer() + garage = fields.Boolean() + garden = fields.Boolean() + garden_area = fields.Boolean() + garden_orientation = fields.Selection( + selection = [('north', 'North'), ('south', 'South'), ('east', 'East')], + ) From a6039152b6c9c960eb9089ba366acd82bee69a77 Mon Sep 17 00:00:00 2001 From: Mauryan Kansara Date: Fri, 3 Jul 2026 17:12:13 +0530 Subject: [PATCH 4/5] [FIX] estate: fix ['estate.property'] have no access rules warning --- estate/__manifest__.py | 5 ++++- estate/models/estate_property.py | 5 +++-- estate/security/ir.model.access.csv | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 estate/security/ir.model.access.csv diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 2bd2fa297e4..06620ffe95b 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -6,5 +6,8 @@ "category": "Tutorials", "depends": ["base"], "application": True, - "installable": True + "installable": True, + "data": [ + "security/ir.model.access.csv", + ] } diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 9bb2d528b6b..0751b88752d 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -1,5 +1,6 @@ from odoo import models, fields + class EstateProperty(models.Model): _name = "estate.property" _description = "Real Estate properties" @@ -8,7 +9,7 @@ class EstateProperty(models.Model): description = fields.Text() postcode = fields.Char() date_availability = fields.Date() - expected_price = fields.Float(reuired=True) + expected_price = fields.Float(required=True) selling_price = fields.Float() bedrooms = fields.Integer() living_area = fields.Integer() @@ -17,5 +18,5 @@ class EstateProperty(models.Model): garden = fields.Boolean() garden_area = fields.Boolean() garden_orientation = fields.Selection( - selection = [('north', 'North'), ('south', 'South'), ('east', 'East')], + selection=[('north', 'North'), ('south', 'South'), ('east', 'East')], ) diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv new file mode 100644 index 00000000000..62797f8607d --- /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_model,access_estate_property,model_estate_property,base.group_user,1,0,0,0 From 6a10e9c1d8f2045ffecaeef320911ac001bf8d58 Mon Sep 17 00:00:00 2001 From: Mauryan Kansara Date: Mon, 6 Jul 2026 17:58:01 +0530 Subject: [PATCH 5/5] [IMP] estate: add basic UI --- .vscode/settings.json | 3 +++ estate/__manifest__.py | 2 ++ estate/models/estate_property.py | 23 +++++++++++++++++++---- estate/security/ir.model.access.csv | 2 +- estate/views/estate_menus.xml | 8 ++++++++ estate/views/estate_property_views.xml | 8 ++++++++ 6 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 estate/views/estate_menus.xml create mode 100644 estate/views/estate_property_views.xml diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..ff5300ef481 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.languageServer": "None" +} \ No newline at end of file diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 06620ffe95b..6c20cd6cf70 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -9,5 +9,7 @@ "installable": True, "data": [ "security/ir.model.access.csv", + "views/estate_menus.xml", + "views/estate_property_views.xml", ] } diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 0751b88752d..d9b40e46d2d 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -1,22 +1,37 @@ from odoo import models, fields +from odoo.tools.rendering_tools import relativedelta_proxy class EstateProperty(models.Model): _name = "estate.property" _description = "Real Estate properties" - name = fields.Char(required=True) + name = fields.Char(required=True, default="Unkown") + last_seen = fields.Datetime("Last Seen", default=fields.Datetime.now) description = fields.Text() postcode = fields.Char() - date_availability = fields.Date() + date_availability = fields.Date( + default=lambda self: fields.Date.today() + relativedelta_proxy(months=3) + ) expected_price = fields.Float(required=True) - selling_price = fields.Float() - bedrooms = fields.Integer() + selling_price = fields.Float(readonly=True, copy=False) + bedrooms = fields.Integer(default=2) living_area = fields.Integer() facades = fields.Integer() garage = fields.Boolean() garden = fields.Boolean() + active = fields.Boolean(default=True) garden_area = fields.Boolean() garden_orientation = fields.Selection( selection=[('north', 'North'), ('south', 'South'), ('east', 'East')], ) + state = fields.Selection( + [ + ("new", "New"), + ("offer_received", "Offer Received"), + ("offer_accepted", "Offer Accepted"), + ("sold", "Sold"), + ("cancelled", "Cancelled"), + ], + default="new", + ) diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index 62797f8607d..3dc956424fe 100644 --- a/estate/security/ir.model.access.csv +++ b/estate/security/ir.model.access.csv @@ -1,2 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_estate_model,access_estate_property,model_estate_property,base.group_user,1,0,0,0 +access_estate_model,access_estate_property,model_estate_property,base.group_user,1,1,1,1 diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml new file mode 100644 index 00000000000..ab2171b5e30 --- /dev/null +++ b/estate/views/estate_menus.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml new file mode 100644 index 00000000000..76d784804cb --- /dev/null +++ b/estate/views/estate_property_views.xml @@ -0,0 +1,8 @@ + + + + Properties + estate.property + list,form + +