From 5f63464f8f16e8abc63a5418d3c014cca89181cb Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Thu, 2 Jul 2026 18:00:45 +0530 Subject: [PATCH 01/10] [ADD] estate: initial module setup -Add the basic structure for the estate module as part of the Odoo Server Framework 101 training. --- estate/__init__.py | 1 + estate/__manifest__.py | 5 +++++ 2 files changed, 6 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..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..7a7de7c7d89 --- /dev/null +++ b/estate/__manifest__.py @@ -0,0 +1,5 @@ +{ +'name' : 'estate', +'depends' : ['base'], +'application' : True, +} \ No newline at end of file From 95807b57b270b833da7a2454c6098e9c2c1ea377 Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Fri, 3 Jul 2026 10:47:33 +0530 Subject: [PATCH 02/10] [LINT] Fix Code Formatting --- estate/__manifest__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 7a7de7c7d89..bdd9d7a5d17 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -1,5 +1,8 @@ { -'name' : 'estate', -'depends' : ['base'], -'application' : True, -} \ No newline at end of file + "name": "estate", + "depends": ["base"], + "application": True, + "author": "Prathamesh", + "category": "Category", + "description": "", +} From 39a054f8e5201b6004c9b73358ec975987e0bb5e Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Fri, 3 Jul 2026 11:23:58 +0530 Subject: [PATCH 03/10] [IMP] Estate:add missing license to manifest --- estate/__init__.py | 2 +- estate/__manifest__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/estate/__init__.py b/estate/__init__.py index 0650744f6bc..8b137891791 100644 --- a/estate/__init__.py +++ b/estate/__init__.py @@ -1 +1 @@ -from . import models + diff --git a/estate/__manifest__.py b/estate/__manifest__.py index bdd9d7a5d17..2072c0ec952 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -4,5 +4,6 @@ "application": True, "author": "Prathamesh", "category": "Category", - "description": "", + "description": "This is the estateapp", + "license": "LGPL-3", } From 0b659baa68130a53ef5b03c53ded809c9eeea8b7 Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Fri, 3 Jul 2026 15:40:12 +0530 Subject: [PATCH 04/10] [IMP] estate: added estate_property model --- estate/__init__.py | 2 +- estate/models/__init__.py | 1 + estate/models/estate_property.py | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) 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 8b137891791..0650744f6bc 100644 --- a/estate/__init__.py +++ b/estate/__init__.py @@ -1 +1 @@ - +from . import models diff --git a/estate/models/__init__.py b/estate/models/__init__.py new file mode 100644 index 00000000000..f4c8fd6db6d --- /dev/null +++ b/estate/models/__init__.py @@ -0,0 +1 @@ +from . import estate_property \ No newline at end of file diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py new file mode 100644 index 00000000000..b910c847fc5 --- /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(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([ + ('north', 'North'), + ('south', 'South'), + ('east', 'East'), + ('west', 'West') + ]) \ No newline at end of file From 37f7a9183d88e7228a4598931c75f57f160db67f Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Fri, 3 Jul 2026 17:17:23 +0530 Subject: [PATCH 05/10] [LINT] estate: improved formating --- estate/__init__.py | 1 + estate/models/__init__.py | 2 +- estate/models/estate_property.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/estate/__init__.py b/estate/__init__.py index 0650744f6bc..899bcc97f0f 100644 --- a/estate/__init__.py +++ b/estate/__init__.py @@ -1 +1,2 @@ from . import models + diff --git a/estate/models/__init__.py b/estate/models/__init__.py index f4c8fd6db6d..5e1963c9d2f 100644 --- a/estate/models/__init__.py +++ b/estate/models/__init__.py @@ -1 +1 @@ -from . import estate_property \ No newline at end of file +from . import estate_property diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index b910c847fc5..07a3ee168a0 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" @@ -22,4 +23,4 @@ class EstateProperty(models.Model): ('south', 'South'), ('east', 'East'), ('west', 'West') - ]) \ No newline at end of file + ]) From c76f126d764098210d585bfa9088ae65220dd650 Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Fri, 3 Jul 2026 17:35:13 +0530 Subject: [PATCH 06/10] [LINT] estate: improved formatting --- estate/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/estate/__init__.py b/estate/__init__.py index 899bcc97f0f..0650744f6bc 100644 --- a/estate/__init__.py +++ b/estate/__init__.py @@ -1,2 +1 @@ from . import models - From 3b2806d79e72a3fc2ecf6d48e5911f7369c5d73b Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Fri, 3 Jul 2026 18:16:18 +0530 Subject: [PATCH 07/10] [IMP] estate: add access rights for estate property model --- estate/security/ir.model.access.csv | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 estate/security/ir.model.access.csv 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 From 268ad795a41401d1fea638705657e488960b0600 Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Fri, 3 Jul 2026 18:26:43 +0530 Subject: [PATCH 08/10] [IMP] estate: add security file to manifest --- estate/__manifest__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 2072c0ec952..1078bc9a34a 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -6,4 +6,7 @@ "category": "Category", "description": "This is the estateapp", "license": "LGPL-3", + "data": [ + "security/ir.model.access.csv", + ], } From 944604c49630d6199fdc5925bb7bd72cce919f03 Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Tue, 7 Jul 2026 14:23:12 +0530 Subject: [PATCH 09/10] [LINT] estate: improved formating --- estate/__manifest__.py | 2 ++ estate/models/estate_property.py | 38 +++++++++++++++++++++++++---- estate/security/ir.model.access.csv | 1 + 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 1078bc9a34a..036527b2bf8 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -8,5 +8,7 @@ "license": "LGPL-3", "data": [ "security/ir.model.access.csv", + "views/estate_property_views.xml", + "views/estate_menus.xml", ], } diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 07a3ee168a0..c8d1c898d6f 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -1,26 +1,54 @@ +from datetime import timedelta 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() + + date_availability = fields.Date( + copy=False, + default=lambda self: fields.Date.today() + timedelta(days=90), + ) + 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() garden_area = fields.Integer() + garden_orientation = fields.Selection([ ('north', 'North'), ('south', 'South'), ('east', 'East'), - ('west', 'West') + ('west', 'West'), ]) + + active = fields.Boolean(default=True) + + state = fields.Selection( + [ + ('new', 'New'), + ('offer_received', 'Offer Received'), + ('offer_accepted', 'Offer Accepted'), + ('sold', 'Sold'), + ('cancelled', 'Cancelled'), + ], + required=True, + copy=False, + default='new', + ) + \ No newline at end of file diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index 32389642d4f..1ce2e5993fc 100644 --- a/estate/security/ir.model.access.csv +++ b/estate/security/ir.model.access.csv @@ -1,2 +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 +,,,,,,, \ No newline at end of file From cc47e43ee84e2ad9c88c4a9e133b952f1bb47060 Mon Sep 17 00:00:00 2001 From: prway-odoo Date: Tue, 7 Jul 2026 15:36:15 +0530 Subject: [PATCH 10/10] [ADD] estate: chapter 5 and chapter 6 (list and forms done) --- .vscode/settings.json | 4 ++ estate/models/estate_property.py | 27 ++++---- estate/views/estate_menus.xml | 19 ++++++ estate/views/estate_property_views.xml | 91 ++++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 13 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..6457d866cb4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "python.languageServer": "None", + "python-envs.defaultEnvManager": "ms-python.python:system" +} \ No newline at end of file diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index c8d1c898d6f..0334da147f1 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -30,25 +30,26 @@ class EstateProperty(models.Model): garden = fields.Boolean() garden_area = fields.Integer() - garden_orientation = fields.Selection([ - ('north', 'North'), - ('south', 'South'), - ('east', 'East'), - ('west', 'West'), - ]) + garden_orientation = fields.Selection( + [ + ("north", "North"), + ("south", "South"), + ("east", "East"), + ("west", "West"), + ] + ) active = fields.Boolean(default=True) state = fields.Selection( [ - ('new', 'New'), - ('offer_received', 'Offer Received'), - ('offer_accepted', 'Offer Accepted'), - ('sold', 'Sold'), - ('cancelled', 'Cancelled'), + ("new", "New"), + ("offer_received", "Offer Received"), + ("offer_accepted", "Offer Accepted"), + ("sold", "Sold"), + ("cancelled", "Cancelled"), ], required=True, copy=False, - default='new', + default="new", ) - \ No newline at end of file diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml new file mode 100644 index 00000000000..e045dfcd8a4 --- /dev/null +++ b/estate/views/estate_menus.xml @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml new file mode 100644 index 00000000000..5451f584625 --- /dev/null +++ b/estate/views/estate_property_views.xml @@ -0,0 +1,91 @@ + + + + + + estate.property.list + estate.property + + + + + + + + + + + + + + + + + estate.property.form + estate.property + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + estate.property.search + estate.property + + + + + + + + + + + + + + + + + Properties + estate.property + list,form + + +