From d6fa10bbaee7380f7a6cb453c5e1093262aa84ab Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Wed, 11 Mar 2026 17:12:35 +0530 Subject: [PATCH 01/11] [ADD] implemented new estate module - chapter :2 task - initiated manifest.py --- estate/__init__.py | 0 estate/__manifest__.py | 8 ++++++++ estate/models/__init__.py | 0 3 files changed, 8 insertions(+) create mode 100644 estate/__init__.py create mode 100644 estate/__manifest__.py create mode 100644 estate/models/__init__.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..6c8888a55bc --- /dev/null +++ b/estate/__manifest__.py @@ -0,0 +1,8 @@ +{ + 'name':"Real Estate", + 'version':"0.1.0", + 'author':"keyur", + 'license':"LGPL-3", + 'category':"Tutorials", + 'depends':['base'], +} \ No newline at end of file diff --git a/estate/models/__init__.py b/estate/models/__init__.py new file mode 100644 index 00000000000..e69de29bb2d From a2c3ce4c9f6864551089a0419a55b3f6b64dc485 Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Wed, 11 Mar 2026 17:43:54 +0530 Subject: [PATCH 02/11] [FIX] estate : fixed the errors - added the required white spaces and new line --- estate/__manifest__.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 6c8888a55bc..e46d719b880 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -1,8 +1,10 @@ { - 'name':"Real Estate", - 'version':"0.1.0", - 'author':"keyur", - 'license':"LGPL-3", - 'category':"Tutorials", - 'depends':['base'], -} \ No newline at end of file + 'name': "Real Estate", + 'version': "0.1.0", + 'author': "keman-odoo", + 'license': "LGPL-3", + 'category': "Tutorials", + 'depends': ['base'], + 'summary': " manage properties, track buyers offers, and handle property sales efficiently" + 'sequence': "3", +} From ea70a7880795802fb897ac30515f61a716ddfc72 Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Wed, 11 Mar 2026 19:09:19 +0530 Subject: [PATCH 03/11] [FIX] Resolve minor mistake --- estate/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index e46d719b880..c5458065a31 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -5,6 +5,6 @@ 'license': "LGPL-3", 'category': "Tutorials", 'depends': ['base'], - 'summary': " manage properties, track buyers offers, and handle property sales efficiently" + 'summary': "manage properties, track buyers offers, and handle property sales efficiently", 'sequence': "3", } From 29b047f946a2d8ba40b64d0c53c20e461d6dbeb2 Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Thu, 12 Mar 2026 10:34:33 +0530 Subject: [PATCH 04/11] [FIX] estate: resolve minor mistake --- estate/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index c5458065a31..a872c7c004c 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -5,6 +5,6 @@ 'license': "LGPL-3", 'category': "Tutorials", 'depends': ['base'], - 'summary': "manage properties, track buyers offers, and handle property sales efficiently", + 'summary': "manage properties, track buyers offers and handle property sales efficiently", 'sequence': "3", } From a5e255368da4a475079c192c32799a82a09401bc Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Thu, 12 Mar 2026 16:25:50 +0530 Subject: [PATCH 05/11] [ADD] estate property model - Create estate.property model. - Add basic property fields. - Add garden orientation selection. --- estate/__init__.py | 1 + estate/models/__init__.py | 1 + estate/models/estate_property.py | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) 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 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 new file mode 100644 index 00000000000..da7a371738d --- /dev/null +++ b/estate/models/estate_property.py @@ -0,0 +1,28 @@ +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') + ], + string = "Garden Orientation" + ) + From 2dfefb75a92c6c2e10ce4373cecd7a6b0b22e717 Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Thu, 12 Mar 2026 17:19:03 +0530 Subject: [PATCH 06/11] [FIX] resolve minor issues in estate property model - Fixed minor errors in estate.property model - Corrected small issues from previous commit --- .vscode/settings.json | 3 +++ estate/models/estate_property.py | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .vscode/settings.json 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/models/estate_property.py b/estate/models/estate_property.py index da7a371738d..2a0b85021ca 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -1,8 +1,9 @@ -from odoo import models,fields +from odoo import models, fields + class EstateProperty(models.Model): _name = "estate.property" - _description =" Real estate Property" + _description = " Real estate Property" name = fields.Char(required=True) description = fields.Text() @@ -18,11 +19,10 @@ class EstateProperty(models.Model): garden_area = fields.Integer() garden_orientation = fields.Selection( [ - ('north' , 'North'), - ('south' , 'South'), - ('east' , 'East'), - ('west' , 'West') + ('north', 'North'), + ('south', 'South'), + ('east', 'East'), + ('west', 'West') ], - string = "Garden Orientation" + string="Garden Orientation" ) - From f7a9bbfb5586ea5a2ce178cddd33d6e0ab10820b Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Thu, 12 Mar 2026 18:36:36 +0530 Subject: [PATCH 07/11] [IMP] estate: add access rights for estate.property model - Created security/ir.model.access.csv - Added the access file to __manifest__.py --- estate/__manifest__.py | 4 ++++ estate/security/ir.model.access.csv | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 estate/security/ir.model.access.csv diff --git a/estate/__manifest__.py b/estate/__manifest__.py index a872c7c004c..a8ea89893d9 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -7,4 +7,8 @@ 'depends': ['base'], 'summary': "manage properties, track buyers offers and handle property sales efficiently", 'sequence': "3", + 'data': [ + '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..bc285aa83b2 --- /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_test_model,access_test_model,model_test_model,base.group_user,1,0,0,0 \ No newline at end of file From 9114b0abf8aff8918bb2c7e2d6b1b8568a217766 Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Fri, 13 Mar 2026 10:38:21 +0530 Subject: [PATCH 08/11] [FIX] resolve security access and module loading issues - - Ensured estate.property model is properly defined --- estate/__manifest__.py | 1 - estate/security/ir.model.access.csv | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index a8ea89893d9..08dc9fce6f8 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -11,4 +11,3 @@ 'security/ir.model.access.csv', ], } - diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index bc285aa83b2..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_test_model,access_test_model,model_test_model,base.group_user,1,0,0,0 \ No newline at end of file +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 470b07a51d494a25f57e59d9e50d7e029eb8a8df Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Fri, 13 Mar 2026 19:14:20 +0530 Subject: [PATCH 09/11] [ADD] estate: estate module UI (views, actions, menus) - Added tree and form views for estate.property - Chapter - 5 - Added menu items for estate module - Completed First UI tutorial exercise --- estate/__manifest__.py | 2 ++ estate/models/estate_property.py | 23 +++++++++++++++++++---- estate/views/estate_menus.xml | 14 ++++++++++++++ estate/views/estate_property_views.xml | 9 +++++++++ 4 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 estate/views/estate_menus.xml create mode 100644 estate/views/estate_property_views.xml diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 08dc9fce6f8..108b60d9643 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -9,5 +9,7 @@ 'sequence': "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 2a0b85021ca..536e575b729 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -1,22 +1,25 @@ from odoo import models, fields +from dateutil.relativedelta import relativedelta class EstateProperty(models.Model): _name = "estate.property" _description = " Real estate Property" - name = fields.Char(required=True) + name = fields.Char(required=True, default="UNKNOWN") description = fields.Text() postcode = fields.Char() - date_availability = fields.Date() + date_availability = fields.Date( + default=lambda self: fields.Date.today() + relativedelta(months=+3), copy=False) 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() + active = fields.Boolean(default=True) garden_orientation = fields.Selection( [ ('north', 'North'), @@ -26,3 +29,15 @@ class EstateProperty(models.Model): ], string="Garden Orientation" ) + state = fields.Selection( + [ + ('new', 'New'), + ('offer_received', 'Offer Received'), + ('offer_accepted', 'Offer Accepted'), + ('sold', 'Sold'), + ('cancelled', 'Cancelled'), + ], + default='new', + copy=False, + required=True, + ) diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml new file mode 100644 index 00000000000..d2025937b79 --- /dev/null +++ b/estate/views/estate_menus.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml new file mode 100644 index 00000000000..911523488a5 --- /dev/null +++ b/estate/views/estate_property_views.xml @@ -0,0 +1,9 @@ + + + + Properties + estate.property + list,form + + + From e175012b8d4c17670ef85cf07eaf85cbb5da8245 Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Mon, 16 Mar 2026 18:12:30 +0530 Subject: [PATCH 10/11] [ADD] estate: property list, form and search views with filters - Add list, form and search views for estate.property with Available filter and Group By Postcode (Chapter 6) --- estate/views/estate_property_views.xml | 94 ++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml index 911523488a5..61c004397ba 100644 --- a/estate/views/estate_property_views.xml +++ b/estate/views/estate_property_views.xml @@ -6,4 +6,98 @@ list,form + + estate.property.list + estate.property + + + + + + + + + + + + + + + estate.property.form + estate.property + +
+ + +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + estate.property.search + estate.property + + + + + + + + + + + + + + + + + + + + From e107a6c4b42926935db94b923ba6af5dfc85c85e Mon Sep 17 00:00:00 2001 From: keman-odoo Date: Tue, 17 Mar 2026 19:25:42 +0530 Subject: [PATCH 11/11] [ADD] estate: property type menu and action - Created estate.property.type model - Added window action for property types - Added menu item under Settings - Users can now create property types (name field) --- estate/__manifest__.py | 3 ++- estate/models/__init__.py | 1 + estate/models/estate_property_type.py | 8 ++++++++ estate/security/ir.model.access.csv | 1 + estate/views/estate_menus.xml | 9 +++++++++ estate/views/estate_property_type_views.xml | 10 ++++++++++ 6 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 estate/models/estate_property_type.py create mode 100644 estate/views/estate_property_type_views.xml diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 108b60d9643..b0bbcdef7a9 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -10,6 +10,7 @@ 'data': [ 'security/ir.model.access.csv', 'views/estate_property_views.xml', - 'views/estate_menus.xml', + 'views/estate_property_type_views.xml', + 'views/estate_menus.xml' ], } diff --git a/estate/models/__init__.py b/estate/models/__init__.py index 5e1963c9d2f..40092a2d810 100644 --- a/estate/models/__init__.py +++ b/estate/models/__init__.py @@ -1 +1,2 @@ from . import estate_property +from . import estate_property_type diff --git a/estate/models/estate_property_type.py b/estate/models/estate_property_type.py new file mode 100644 index 00000000000..1ab4e1f7317 --- /dev/null +++ b/estate/models/estate_property_type.py @@ -0,0 +1,8 @@ +from odoo import models, fields + + +class EstateProperty(models.Model): + _name = "estate.property.type" + _description = "estate property" + + name = fields.Char(required=True) diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index 32389642d4f..11da225066f 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 +access_estate_property_type,access_estate_property_type,model_estate_property_type,base.group_user,1,1,1,1 diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml index d2025937b79..da42e7b2e5c 100644 --- a/estate/views/estate_menus.xml +++ b/estate/views/estate_menus.xml @@ -11,4 +11,13 @@ parent="estate_advertisements_menu" action="estate_property_action"/> + + + + diff --git a/estate/views/estate_property_type_views.xml b/estate/views/estate_property_type_views.xml new file mode 100644 index 00000000000..2189401a40c --- /dev/null +++ b/estate/views/estate_property_type_views.xml @@ -0,0 +1,10 @@ + + + + + Properties type + estate.property.type + list,form + + +