From 6ee57766c8ceec8c49461f316b49e7cb71fb811f Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Tue, 15 Sep 2026 16:17:11 +0200 Subject: [PATCH 01/13] [ADD] Real estate module --- estate/__init__.py | 0 estate/__manifest__.py | 4 ++++ 2 files changed, 4 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..040070dfcee --- /dev/null +++ b/estate/__manifest__.py @@ -0,0 +1,4 @@ +{ + 'name' : 'Real Estate', + 'depends' : ['base'] +} \ No newline at end of file From 44c3a474a48d1c356c6ac39528dc7b63541e26c5 Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Tue, 15 Sep 2026 16:31:14 +0200 Subject: [PATCH 02/13] [IMP] make real estate an app --- estate/__manifest__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 040070dfcee..0dcfdbe0d25 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -1,4 +1,5 @@ { 'name' : 'Real Estate', - 'depends' : ['base'] + 'depends' : ['base'], + 'application': True, } \ No newline at end of file From 0a0c75a2bb05dc540dbff395765566f912665f2f Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Wed, 16 Sep 2026 09:21:39 +0200 Subject: [PATCH 03/13] [ADD] Fields to real estate model --- estate/__init__.py | 1 + estate/models/__init__.py | 1 + estate/models/estate_property.py | 19 +++++++++++++++++++ 3 files changed, 21 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..9a7e03eded3 100644 --- a/estate/__init__.py +++ b/estate/__init__.py @@ -0,0 +1 @@ +from . import models \ No newline at end of file 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..065256f83fe --- /dev/null +++ b/estate/models/estate_property.py @@ -0,0 +1,19 @@ +from odoo import fields, models + +class EstateProperty(models.Model): + _name = "estate_property" + _description = "This is the model for the 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() + garage = fields.Boolean() + garden = fields.Boolean() + garden_area = fields.Integer() + garden_orientation = fields.Selection(string='Orientation', + selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')], help="Garden Orientation (North, South, East, West)") \ No newline at end of file From a268f88f90aa2c6c1004abc6e760adb255817348 Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Wed, 16 Sep 2026 09:45:52 +0200 Subject: [PATCH 04/13] [ADD] Import access rights --- estate/__manifest__.py | 10 ++++++++-- estate/security/ir.model.access.csv | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 estate/security/ir.model.access.csv diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 0dcfdbe0d25..27fffb4ee8f 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -1,5 +1,11 @@ { - 'name' : 'Real Estate', - 'depends' : ['base'], + 'name' : "Real Estate", + 'depends' : ["base"], 'application': True, + 'installable': True, + 'author': 'mialm', + 'license': 'LGPL-3', + 'data' : [ + "security/ir.model.access.csv" + ] } \ No newline at end of file diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv new file mode 100644 index 00000000000..334031a21ca --- /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,estate.model_estate_property,base.group_user,1,1,1,1 \ No newline at end of file From a57ee8ff0243fc7b746918105aa295d54dda2c3e Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Wed, 16 Sep 2026 10:52:12 +0200 Subject: [PATCH 05/13] [ADD] UI and more fields --- estate/__manifest__.py | 4 +++- estate/models/estate_property.py | 16 ++++++++++------ estate/views/estate_menus.xml | 8 ++++++++ estate/views/estate_property_views.xml | 8 ++++++++ 4 files changed, 29 insertions(+), 7 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 27fffb4ee8f..c3e95079cb0 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -6,6 +6,8 @@ 'author': 'mialm', 'license': 'LGPL-3', 'data' : [ - "security/ir.model.access.csv" + "security/ir.model.access.csv", + "views/estate_property_views.xml", + "views/estate_menus.xml" ] } \ No newline at end of file diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 065256f83fe..7d70b5948ea 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -4,16 +4,20 @@ class EstateProperty(models.Model): _name = "estate_property" _description = "This is the model for the real estate property :)" - name = fields.Char(required=True) + 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() + date_availability = fields.Date(copy = False, default = fields.Datetime.add(fields.Datetime.today(), months=3)) + expected_price = fields.Float(required = True) + selling_price = fields.Float(readonly = True, copy = False) + bedrooms = fields.Integer(default = 2) living_area = fields.Integer() garage = fields.Boolean() garden = fields.Boolean() garden_area = fields.Integer() garden_orientation = fields.Selection(string='Orientation', - selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')], help="Garden Orientation (North, South, East, West)") \ No newline at end of file + selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')], help="Garden Orientation (North, South, East, West)") + active = fields.Boolean(default=True) + stage = fields.Selection(string="Stage", + selection=[("new", "New"), ("offer received", "Offer Received"), ("offer accepted", "Offer Accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")], + required = True, default = "new", copy = False) \ 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..be3960c6797 --- /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..168243802d9 --- /dev/null +++ b/estate/views/estate_property_views.xml @@ -0,0 +1,8 @@ + + + + Estate Property + estate_property + list,form + + \ No newline at end of file From 39ae4fab4d1f157dd4f762e8d02b284075a68919 Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Wed, 16 Sep 2026 10:56:39 +0200 Subject: [PATCH 06/13] [FIX] style check --- estate/__init__.py | 2 +- estate/__manifest__.py | 6 +++--- estate/models/__init__.py | 2 +- estate/models/estate_property.py | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/estate/__init__.py b/estate/__init__.py index 9a7e03eded3..0650744f6bc 100644 --- a/estate/__init__.py +++ b/estate/__init__.py @@ -1 +1 @@ -from . import models \ No newline at end of file +from . import models diff --git a/estate/__manifest__.py b/estate/__manifest__.py index c3e95079cb0..e1152aac944 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -1,11 +1,11 @@ { - 'name' : "Real Estate", - 'depends' : ["base"], + 'name': "Real Estate", + 'depends': ["base"], 'application': True, 'installable': True, 'author': 'mialm', 'license': 'LGPL-3', - 'data' : [ + 'data': [ "security/ir.model.access.csv", "views/estate_property_views.xml", "views/estate_menus.xml" 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 7d70b5948ea..3cb0dfc4515 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -1,9 +1,9 @@ from odoo import fields, models + class EstateProperty(models.Model): _name = "estate_property" _description = "This is the model for the real estate property :)" - name = fields.Char(required = True) description = fields.Text() postcode = fields.Char() @@ -16,8 +16,8 @@ class EstateProperty(models.Model): garden = fields.Boolean() garden_area = fields.Integer() garden_orientation = fields.Selection(string='Orientation', - selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')], help="Garden Orientation (North, South, East, West)") + selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')], help="Garden Orientation (North, South, East, West)") active = fields.Boolean(default=True) stage = fields.Selection(string="Stage", - selection=[("new", "New"), ("offer received", "Offer Received"), ("offer accepted", "Offer Accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")], - required = True, default = "new", copy = False) \ No newline at end of file + selection=[("new", "New"), ("offer received", "Offer Received"), ("offer accepted", "Offer Accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")], + required = True, default = "new", copy = False) From 4dcba3e06e9620127b7af464cc447ad314a2afa7 Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Wed, 16 Sep 2026 11:01:30 +0200 Subject: [PATCH 07/13] FIX [style check] --- estate/models/estate_property.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 3cb0dfc4515..2f98d6cd455 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -4,12 +4,12 @@ class EstateProperty(models.Model): _name = "estate_property" _description = "This is the model for the real estate property :)" - name = fields.Char(required = True) + name = fields.Char(required=True) description = fields.Text() postcode = fields.Char() - date_availability = fields.Date(copy = False, default = fields.Datetime.add(fields.Datetime.today(), months=3)) - expected_price = fields.Float(required = True) - selling_price = fields.Float(readonly = True, copy = False) + date_availability = fields.Date(copy=False, default=fields.Datetime.add(fields.Datetime.today(), months=3)) + expected_price = fields.Float(required=True) + selling_price = fields.Float(readonly=True, copy=False) bedrooms = fields.Integer(default = 2) living_area = fields.Integer() garage = fields.Boolean() @@ -20,4 +20,4 @@ class EstateProperty(models.Model): active = fields.Boolean(default=True) stage = fields.Selection(string="Stage", selection=[("new", "New"), ("offer received", "Offer Received"), ("offer accepted", "Offer Accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")], - required = True, default = "new", copy = False) + required=True, default="new", copy=False) From 0249a1655ce0718fa54511e23e035ceb043a9c72 Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Wed, 16 Sep 2026 11:16:35 +0200 Subject: [PATCH 08/13] [FIX] style check (finally?) --- estate/__manifest__.py | 2 +- estate/models/estate_property.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index e1152aac944..cca9d0855c7 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -10,4 +10,4 @@ "views/estate_property_views.xml", "views/estate_menus.xml" ] -} \ No newline at end of file +} diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 2f98d6cd455..0cdee4dbfc7 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -10,7 +10,7 @@ class EstateProperty(models.Model): date_availability = fields.Date(copy=False, default=fields.Datetime.add(fields.Datetime.today(), months=3)) expected_price = fields.Float(required=True) selling_price = fields.Float(readonly=True, copy=False) - bedrooms = fields.Integer(default = 2) + bedrooms = fields.Integer(default=2) living_area = fields.Integer() garage = fields.Boolean() garden = fields.Boolean() @@ -18,6 +18,6 @@ class EstateProperty(models.Model): garden_orientation = fields.Selection(string='Orientation', selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')], help="Garden Orientation (North, South, East, West)") active = fields.Boolean(default=True) - stage = fields.Selection(string="Stage", + stage = fields.Selection(string="Stage", selection=[("new", "New"), ("offer received", "Offer Received"), ("offer accepted", "Offer Accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")], required=True, default="new", copy=False) From bd962374e9dc1ca212c5ca537012675170b7aab1 Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Thu, 17 Sep 2026 09:31:00 +0200 Subject: [PATCH 09/13] [ADD] Custom Views --- estate/models/estate_property.py | 1 + estate/views/estate_menus.xml | 8 +-- estate/views/estate_property_views.xml | 75 +++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 5 deletions(-) diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index 0cdee4dbfc7..a02a13a0e86 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -12,6 +12,7 @@ class EstateProperty(models.Model): 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() diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml index be3960c6797..b8727f21414 100644 --- a/estate/views/estate_menus.xml +++ b/estate/views/estate_menus.xml @@ -1,8 +1,8 @@ - - - + + + + - \ No newline at end of file diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml index 168243802d9..c71f157feb7 100644 --- a/estate/views/estate_property_views.xml +++ b/estate/views/estate_property_views.xml @@ -5,4 +5,77 @@ estate_property list,form - \ No newline at end of file + + + estate_property.list + estate_property + + + + + + + + + + + + + + + estate_property.form + estate_property + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + estate_property.search + estate_property + + + + + + + + + + + + + + + + From 91c974b987256f4e6dbbcf86d189aaab2d3cf2ea Mon Sep 17 00:00:00 2001 From: Miguel Almeida Morais <102000563+MiguelitoM@users.noreply.github.com> Date: Thu, 17 Sep 2026 11:02:46 +0200 Subject: [PATCH 10/13] Update estate/models/estate_property.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Leclerc Léo (leol) <74907637+leclerc-leo@users.noreply.github.com> --- estate/models/estate_property.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py index a02a13a0e86..19ff82b634b 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -2,8 +2,9 @@ class EstateProperty(models.Model): - _name = "estate_property" - _description = "This is the model for the real estate property :)" + _name = "estate.property" + _description = "This is the model for the real estate + name = fields.Char(required=True) description = fields.Text() postcode = fields.Char() From 9164c2f5fde2cd710e702a8785bd1cdc4ebaae16 Mon Sep 17 00:00:00 2001 From: Miguel Almeida Morais <102000563+MiguelitoM@users.noreply.github.com> Date: Thu, 17 Sep 2026 11:02:56 +0200 Subject: [PATCH 11/13] Update estate/__manifest__.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Leclerc Léo (leol) <74907637+leclerc-leo@users.noreply.github.com> --- estate/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/estate/__manifest__.py b/estate/__manifest__.py index cca9d0855c7..f6277e22b57 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -3,7 +3,7 @@ 'depends': ["base"], 'application': True, 'installable': True, - 'author': 'mialm', + 'author': 'Odoo S.A.', 'license': 'LGPL-3', 'data': [ "security/ir.model.access.csv", From 88632a4a0c010e245a4c60132b7bdfc4bf085f9e Mon Sep 17 00:00:00 2001 From: Miguel Almeida Morais <102000563+MiguelitoM@users.noreply.github.com> Date: Thu, 17 Sep 2026 11:03:29 +0200 Subject: [PATCH 12/13] Update estate/models/estate_property.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Leclerc Léo (leol) <74907637+leclerc-leo@users.noreply.github.com> --- 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 19ff82b634b..5223766c2b2 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -8,7 +8,7 @@ class EstateProperty(models.Model): name = fields.Char(required=True) description = fields.Text() postcode = fields.Char() - date_availability = fields.Date(copy=False, default=fields.Datetime.add(fields.Datetime.today(), months=3)) + date_availability = fields.Date(copy=False, default=lambda self: fields.Datetime.add(fields.Datetime.today(), months=3)) expected_price = fields.Float(required=True) selling_price = fields.Float(readonly=True, copy=False) bedrooms = fields.Integer(default=2) From 0caa860cb2fb17f80d6c88f5b3ddbead5c3a7597 Mon Sep 17 00:00:00 2001 From: Miguel Morais Date: Thu, 17 Sep 2026 11:07:35 +0200 Subject: [PATCH 13/13] [FIX] small fix --- 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 5223766c2b2..e14f3c200a1 100644 --- a/estate/models/estate_property.py +++ b/estate/models/estate_property.py @@ -3,7 +3,7 @@ class EstateProperty(models.Model): _name = "estate.property" - _description = "This is the model for the real estate + _description = "This is the model for the real estate" name = fields.Char(required=True) description = fields.Text()