From 064c8b618629fc63f84235145abbbd1c6679665f Mon Sep 17 00:00:00 2001 From: Piyush11204 Date: Thu, 2 Jul 2026 16:40:58 +0530 Subject: [PATCH 1/7] [ADD] estate: add real estate module --- estate/__init__.py | 0 estate/__manifest__.py | 14 ++++++++++++++ 2 files changed, 14 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..f1e0e3932e0 --- /dev/null +++ b/estate/__manifest__.py @@ -0,0 +1,14 @@ +{ + "name": "Real Estate", + "version": "1.0", + "summary": "Real Estate Management", + "description": """ + Real Estate Tutorial Module + """, + "author": "Piyush", + "category": "Tutorials", + "depends": ["base"], + "data": [], + "application": True, + "installable": True, +} \ No newline at end of file From ce23a4d2888bf24e7a79cf6441057d0abb97a3b5 Mon Sep 17 00:00:00 2001 From: Piyush11204 Date: Thu, 2 Jul 2026 18:43:33 +0530 Subject: [PATCH 2/7] [ADD] estate: add property model --- estate/models/__init__.py | 0 estate/models/estate_property.py | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 estate/models/__init__.py create mode 100644 estate/models/estate_property.py diff --git a/estate/models/__init__.py b/estate/models/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py new file mode 100644 index 00000000000..88f2df97caa --- /dev/null +++ b/estate/models/estate_property.py @@ -0,0 +1,10 @@ +from odoo import fields,models + + +class EstateProperty(models.Model): + _name = "estate.property" + _description = "Real Estate Property" + + name = fields.Char() + expected_price = fields.Float() + bedrooms = fields.Integer() \ No newline at end of file From 19e03bdbab79230c28f0e183de775518a2d739b5 Mon Sep 17 00:00:00 2001 From: Piyush11204 Date: Fri, 3 Jul 2026 11:20:59 +0530 Subject: [PATCH 3/7] [LINT] estate: fix coding style issues --- estate/__init__.py | 1 + estate/__manifest__.py | 3 ++- estate/models/__init__.py | 1 + estate/models/estate_property.py | 32 +++++++++++++++++++++++++++----- 4 files changed, 31 insertions(+), 6 deletions(-) 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/__manifest__.py b/estate/__manifest__.py index f1e0e3932e0..d3eebb7b27b 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -8,7 +8,8 @@ "author": "Piyush", "category": "Tutorials", "depends": ["base"], + "license": "LGPL-3", "data": [], "application": True, "installable": True, -} \ No newline at end of file +} diff --git a/estate/models/__init__.py b/estate/models/__init__.py index e69de29bb2d..5e1963c9d2f 100644 --- a/estate/models/__init__.py +++ 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 index 88f2df97caa..bf182c4231d 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -1,10 +1,32 @@ -from odoo import fields,models +from odoo import fields, models class EstateProperty(models.Model): _name = "estate.property" _description = "Real Estate Property" - - name = fields.Char() - expected_price = fields.Float() - bedrooms = fields.Integer() \ No newline at end of file + + name = fields.Char(required=True) + description = fields.Text() + postcode = fields.Char() + date_availability = fields.Date() + + expected_price = fields.Float(required=True) + selling_price = fields.Float() + + bedrooms = fields.Integer() + living_area = fields.Integer() + facades = fields.Integer() + + garage = fields.Boolean() + garden = fields.Boolean() + garden_area = fields.Integer() + + garden_orientation = fields.Selection( + selection=[ + ("north", "North"), + ("south", "South"), + ("east", "East"), + ("west", "West"), + ], + string="Garden Orientation", +) From 60e1b806d2343074f480cdac63d29a36b48df540 Mon Sep 17 00:00:00 2001 From: Piyush11204 Date: Fri, 3 Jul 2026 14:06:33 +0530 Subject: [PATCH 4/7] [LINT] estate: fix the lint error --- estate/models/estate_property.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index bf182c4231d..1ee01deefc3 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -28,5 +28,5 @@ class EstateProperty(models.Model): ("east", "East"), ("west", "West"), ], - string="Garden Orientation", + string="Garden Orientation", ) From 3356b1afb4d734cc843470527323b42842fa75ac Mon Sep 17 00:00:00 2001 From: Piyush11204 Date: Fri, 3 Jul 2026 15:18:43 +0530 Subject: [PATCH 5/7] [ADD] estate: add access control for estate property model --- estate/__manifest__.py | 4 +++- estate/security/ir.model.access.csv | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 estate/security/ir.model.access.csv diff --git a/estate/__manifest__.py b/estate/__manifest__.py index d3eebb7b27b..ffff1be3ad5 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -9,7 +9,9 @@ "category": "Tutorials", "depends": ["base"], "license": "LGPL-3", - "data": [], + "data": [ + "security/ir.model.access.csv", + ], "application": True, "installable": True, } diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv new file mode 100644 index 00000000000..0e11f47e58d --- /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 \ No newline at end of file From 34a9ee245781d627b8b028de5938203ec73f94e5 Mon Sep 17 00:00:00 2001 From: Piyush11204 Date: Fri, 3 Jul 2026 17:03:38 +0530 Subject: [PATCH 6/7] [LINT] estate: Fix the issues --- estate/models/estate_property.py | 2 +- estate/security/ir.model.access.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 1ee01deefc3..26ada06338b 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -4,7 +4,7 @@ class EstateProperty(models.Model): _name = "estate.property" _description = "Real Estate Property" - + name = fields.Char(required=True) description = fields.Text() postcode = fields.Char() diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index 0e11f47e58d..32389642d4f 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_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 \ No newline at end of file +access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 From f8a252cbb01287d0e188e71f2f29bd0eaf45d536 Mon Sep 17 00:00:00 2001 From: Piyush11204 Date: Fri, 3 Jul 2026 17:12:17 +0530 Subject: [PATCH 7/7] [LINT] estate: Fix spacing issue --- estate/models/estate_property.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 26ada06338b..1ee01deefc3 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -4,7 +4,7 @@ class EstateProperty(models.Model): _name = "estate.property" _description = "Real Estate Property" - + name = fields.Char(required=True) description = fields.Text() postcode = fields.Char()