From cd44e58af4e51c3f1836d8b3f788d29a339bbe4b Mon Sep 17 00:00:00 2001 From: pryes-odoo Date: Fri, 3 Jul 2026 17:18:51 +0530 Subject: [PATCH 1/6] [ADD] estate: create initial estate module Initialized the Estate application Configured the required module metadata Configured the module as an installable application Completed Chapter 2 --- estate/__init__.py | 0 estate/__manifest__.py | 10 ++++++++++ 2 files changed, 10 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..b13b8279b19 --- /dev/null +++ b/estate/__manifest__.py @@ -0,0 +1,10 @@ +{ + 'name': 'Estate', + 'version': '1.0', + 'category': 'Tutorials', + 'depends': ['base'], + 'installable': True, + 'application': True, + 'author': 'Prerana Yesugade', + 'license': 'LGPL-3', +} From 64016b8593238b78ac609d49d016d7be944da976 Mon Sep 17 00:00:00 2001 From: pryes-odoo Date: Mon, 6 Jul 2026 17:55:15 +0530 Subject: [PATCH 2/6] [ADD] estate: create property model and basic fields Created the Estate Property model Added the basic property fields Generated the estate_property database table Completed Chapter 3 --- estate/__init__.py | 1 + estate/__manifest__.py | 16 ++++++++-------- estate/models/__init__.py | 1 + estate/models/estate_property.py | 28 ++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 8 deletions(-) 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/__manifest__.py b/estate/__manifest__.py index b13b8279b19..4de8dbb46a2 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -1,10 +1,10 @@ { - 'name': 'Estate', - 'version': '1.0', - 'category': 'Tutorials', - 'depends': ['base'], - 'installable': True, - 'application': True, - 'author': 'Prerana Yesugade', - 'license': 'LGPL-3', + "name": "Estate", + "version": "1.0", + "category": "Tutorials", + "depends": ["base"], + "installable": True, + "application": True, + "author": "Prerana Yesugade", + "license": "LGPL-3", } 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..d34cc0417d0 --- /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 = "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( + string="Type", + selection=[ + ("north", "North"), + ("south", "South"), + ("east", "East"), + ("west", "West"), + ], + ) From f3ae61f0cbf8ed7731238c54da6857b7153101d4 Mon Sep 17 00:00:00 2001 From: pryes-odoo Date: Tue, 7 Jul 2026 15:48:09 +0530 Subject: [PATCH 3/6] [ADD] estate: add access rights to estate property model Completed Chapter 4 --- estate/__manifest__.py | 2 +- estate/security/ir.model.access.csv | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 estate/security/ir.model.access.csv diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 4de8dbb46a2..385b1bea425 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -3,7 +3,7 @@ "version": "1.0", "category": "Tutorials", "depends": ["base"], - "installable": True, + "data": ["security/ir.model.access.csv"], "application": True, "author": "Prerana Yesugade", "license": "LGPL-3", diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv new file mode 100644 index 00000000000..98f4671fb0d --- /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 +estate.access_estate_property,access_estate_property,estate.model_estate_property,base.group_user,1,1,1,1 From 177d0402a5b67f0a6e73989e2dbda4175da8fe5b Mon Sep 17 00:00:00 2001 From: pryes-odoo Date: Wed, 8 Jul 2026 18:44:55 +0530 Subject: [PATCH 4/6] [ADD] estate: add window action for estate property model --- estate/__manifest__.py | 2 +- estate/views/estate_property_views.xml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 estate/views/estate_property_views.xml diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 385b1bea425..0a1a311d7e6 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -3,7 +3,7 @@ "version": "1.0", "category": "Tutorials", "depends": ["base"], - "data": ["security/ir.model.access.csv"], + "data": ["security/ir.model.access.csv", "views/estate_property_views.xml"], "application": True, "author": "Prerana Yesugade", "license": "LGPL-3", diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml new file mode 100644 index 00000000000..038f09beff9 --- /dev/null +++ b/estate/views/estate_property_views.xml @@ -0,0 +1,8 @@ + + + + Properties + estate.property + list,form + + From 02cc60d333aa69f3b8a80e9fd11f49d85670d2e3 Mon Sep 17 00:00:00 2001 From: pryes-odoo Date: Thu, 9 Jul 2026 18:48:15 +0530 Subject: [PATCH 5/6] [ADD] estate: add menus, defaults and active field Add Real Estate menus Prevent copying selling price and availability date Set default bedrooms and availability date Add active reserved field with default value --- estate/__manifest__.py | 6 +++++- estate/models/estate_property.py | 11 +++++++---- estate/views/estate_menus.xml | 8 ++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 estate/views/estate_menus.xml diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 0a1a311d7e6..da1db307166 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -3,7 +3,11 @@ "version": "1.0", "category": "Tutorials", "depends": ["base"], - "data": ["security/ir.model.access.csv", "views/estate_property_views.xml"], + "data": [ + "security/ir.model.access.csv", + "views/estate_property_views.xml", + "views/estate_menus.xml", + ], "application": True, "author": "Prerana Yesugade", "license": "LGPL-3", diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index d34cc0417d0..9ad918b4070 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -7,16 +7,19 @@ class EstateProperty(models.Model): 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.add(fields.Date.today(), months=3) + ) expected_price = fields.Float(required=True) - selling_price = fields.Float() - bedrooms = fields.Integer() + active = fields.Boolean(default=True) + 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() + postcode = fields.Char() garden_orientation = fields.Selection( string="Type", selection=[ diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml new file mode 100644 index 00000000000..ee95cb594dc --- /dev/null +++ b/estate/views/estate_menus.xml @@ -0,0 +1,8 @@ + + + + + + + + From 9f58e9858e90558225fe85b69b3ef5733c6217b4 Mon Sep 17 00:00:00 2001 From: pryes-odoo Date: Fri, 10 Jul 2026 15:31:33 +0530 Subject: [PATCH 6/6] [IMP] estate: add state field for property lifecycle Completed chapter 5 --- estate/models/estate_property.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 9ad918b4070..f35fbef38a0 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -29,3 +29,15 @@ class EstateProperty(models.Model): ("west", "West"), ], ) + state = fields.Selection( + [ + ("new", "New"), + ("offer_received", "Offer Received"), + ("offer_accepted", "Offer Accepted"), + ("sold", "Sold"), + ("cancelled", "Cancelled"), + ], + required=True, + default="new", + copy=False, + )