From f37f7e84bce24b2f6e98834c23d3dd8a6b374f22 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Thu, 5 Jun 2025 11:08:36 +0200 Subject: [PATCH 01/12] [ADD] -Created an importable estate module. --- estate/__init__.py | 0 estate/__manifest__.py | 12 ++++++++++++ 2 files changed, 12 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..a59c55a1dc1 --- /dev/null +++ b/estate/__manifest__.py @@ -0,0 +1,12 @@ +{ + 'name': 'Estate', + 'version': '1.0', + 'category': 'Estate', + 'summary': 'Tutorial module', + 'depends': [ + 'base' + ], + 'data': [ + ], + 'license': 'OEEL-1', +} From a020848f515fbf86e711c88cc56fa490d10512e2 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Thu, 5 Jun 2025 12:04:05 +0200 Subject: [PATCH 02/12] [IMP] -Added estate property model with some basic fields. --- estate/__manifest__.py | 1 + estate/data/estate_property.xml | 118 ++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 estate/data/estate_property.xml diff --git a/estate/__manifest__.py b/estate/__manifest__.py index a59c55a1dc1..f4fd0eaed61 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -7,6 +7,7 @@ 'base' ], 'data': [ + 'data/estate_property.xml' ], 'license': 'OEEL-1', } diff --git a/estate/data/estate_property.xml b/estate/data/estate_property.xml new file mode 100644 index 00000000000..7a29be99e21 --- /dev/null +++ b/estate/data/estate_property.xml @@ -0,0 +1,118 @@ + + + + Estate Property + x_estate.property + + + + + x_name + Name + char + True + + + + + x_selling_price + Selling Price + float + True + + + + + x_description + Description + html + + + + + x_postcode + Postcode + char + + + + + x_date_availability + Date Availability + date + + + + + x_expected_price + Expected Price + float + True + + + + + x_living_area + Living Area + integer + + + + + x_facades + Facades + integer + + + + + x_garage + Garage + boolean + + + + + x_garden + Garden + boolean + + + + + x_garden_area + Garden Area + integer + + + + + x_garden_orientation + Garden Orientation + selection + + + + + North + north + + + + + South + south + + + + + East + east + + + + + West + west + + From cbbf69f0b557d8c6dead841df12ace304fe28c94 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Thu, 5 Jun 2025 14:29:03 +0200 Subject: [PATCH 03/12] [IMP] -Added access rights for the estate property model. --- estate/__manifest__.py | 3 ++- estate/security/ir.model.access.csv | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 estate/security/ir.model.access.csv diff --git a/estate/__manifest__.py b/estate/__manifest__.py index f4fd0eaed61..8cf5367aaaa 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -7,7 +7,8 @@ 'base' ], 'data': [ - 'data/estate_property.xml' + 'data/estate_property.xml', + 'security/ir.model.access.csv', ], 'license': 'OEEL-1', } diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv new file mode 100644 index 00000000000..8a1c5ea2f5c --- /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_x_estate_property,access_x_estate_property,model_estate_property,base.group_user,1,1,1,1 From 308ddb262cf4a9078da5a6e83acb505792d0a2d4 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Thu, 5 Jun 2025 16:08:11 +0200 Subject: [PATCH 04/12] [IMP] -added list and form views for estate model. -added menus to access estate views from main menu. --- estate/__manifest__.py | 2 + estate/data/estate_property.xml | 7 +++ estate/views/estate_menus.xml | 9 ++++ estate/views/estate_property_views.xml | 61 ++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) 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 8cf5367aaaa..8cc427aedfd 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -9,6 +9,8 @@ 'data': [ 'data/estate_property.xml', 'security/ir.model.access.csv', + 'views/estate_property_views.xml', + 'views/estate_menus.xml', ], 'license': 'OEEL-1', } diff --git a/estate/data/estate_property.xml b/estate/data/estate_property.xml index 7a29be99e21..75f4dbd9739 100644 --- a/estate/data/estate_property.xml +++ b/estate/data/estate_property.xml @@ -50,6 +50,13 @@ True + + + x_bedrooms + Bedrooms + integer + + x_living_area diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml new file mode 100644 index 00000000000..82c43479c6b --- /dev/null +++ b/estate/views/estate_menus.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml new file mode 100644 index 00000000000..7a40ad7fe8d --- /dev/null +++ b/estate/views/estate_property_views.xml @@ -0,0 +1,61 @@ + + + + + Estate Property + x_estate.property + list,form + + + + x_estate.property.list + x_estate.property + + + + + + + + + + + + + + + x_estate.property.form + x_estate.property + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
From 60c281cf8ec72c07df0ebd057b95781a30ce6353 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Thu, 5 Jun 2025 17:41:45 +0200 Subject: [PATCH 05/12] [IMP] -Created estate property type model. -Added list view to estate property type. -Added menu to access estate property type. -Added access rights to estate property type. -Added some related fields to estate property. -Added the new fields to the view. --- estate/__manifest__.py | 2 ++ estate/data/estate_property.xml | 26 +++++++++++++++++++++ estate/data/estate_property_type.xml | 15 ++++++++++++ estate/security/ir.model.access.csv | 1 + estate/views/estate_menus.xml | 4 ++++ estate/views/estate_property_type_views.xml | 19 +++++++++++++++ estate/views/estate_property_views.xml | 8 +++++++ 7 files changed, 75 insertions(+) create mode 100644 estate/data/estate_property_type.xml create mode 100644 estate/views/estate_property_type_views.xml diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 8cc427aedfd..65592618457 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -7,9 +7,11 @@ 'base' ], 'data': [ + 'data/estate_property_type.xml', 'data/estate_property.xml', 'security/ir.model.access.csv', 'views/estate_property_views.xml', + 'views/estate_property_type_views.xml', 'views/estate_menus.xml', ], 'license': 'OEEL-1', diff --git a/estate/data/estate_property.xml b/estate/data/estate_property.xml index 75f4dbd9739..8196ffb2f5b 100644 --- a/estate/data/estate_property.xml +++ b/estate/data/estate_property.xml @@ -122,4 +122,30 @@ West west
+ + + + x_property_type_id + Type + many2one + x_estate.property.type + True + restrict + + + + + x_partner_id + Buyer + many2one + res.partner + + + + + x_user_id + Salesperson + many2one + res.partner + diff --git a/estate/data/estate_property_type.xml b/estate/data/estate_property_type.xml new file mode 100644 index 00000000000..2858005f6ea --- /dev/null +++ b/estate/data/estate_property_type.xml @@ -0,0 +1,15 @@ + + + + Estate Property Type + x_estate.property.type + + + + + x_name + Name + char + True + + diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index 8a1c5ea2f5c..2433d633642 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_x_estate_property,access_x_estate_property,model_estate_property,base.group_user,1,1,1,1 +access_x_estate_property_type,access_x_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 82c43479c6b..aae5a55153d 100644 --- a/estate/views/estate_menus.xml +++ b/estate/views/estate_menus.xml @@ -5,5 +5,9 @@ + + + + diff --git a/estate/views/estate_property_type_views.xml b/estate/views/estate_property_type_views.xml new file mode 100644 index 00000000000..5dc0eac6964 --- /dev/null +++ b/estate/views/estate_property_type_views.xml @@ -0,0 +1,19 @@ + + + + + Property Types + x_estate.property.type + list + + + + x_estate.property.type.list + x_estate.property.type + + + + + + + diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml index 7a40ad7fe8d..0cfdef5f7fd 100644 --- a/estate/views/estate_property_views.xml +++ b/estate/views/estate_property_views.xml @@ -34,6 +34,7 @@ + @@ -53,6 +54,13 @@ + + + + + + + From 6c1dc9abc36be602e3285471bb83b13fdade151f Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Thu, 5 Jun 2025 18:07:41 +0200 Subject: [PATCH 06/12] [IMP] -created estate property tag model. -created list view for estate property tag. -created menu to access estate property tags. -created a filed for tag ids in estate property. -Added the new field to estate property view. --- estate/__manifest__.py | 2 ++ estate/data/estate_property.xml | 8 ++++++++ estate/data/estate_property_tag.xml | 23 ++++++++++++++++++++++ estate/data/estate_property_type.xml | 1 + estate/security/ir.model.access.csv | 1 + estate/views/estate_menus.xml | 1 + estate/views/estate_property_tag_views.xml | 19 ++++++++++++++++++ estate/views/estate_property_views.xml | 1 + 8 files changed, 56 insertions(+) create mode 100644 estate/data/estate_property_tag.xml create mode 100644 estate/views/estate_property_tag_views.xml diff --git a/estate/__manifest__.py b/estate/__manifest__.py index 65592618457..c1cf5fbd823 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -8,10 +8,12 @@ ], 'data': [ 'data/estate_property_type.xml', + 'data/estate_property_tag.xml', 'data/estate_property.xml', 'security/ir.model.access.csv', 'views/estate_property_views.xml', 'views/estate_property_type_views.xml', + 'views/estate_property_tag_views.xml', 'views/estate_menus.xml', ], 'license': 'OEEL-1', diff --git a/estate/data/estate_property.xml b/estate/data/estate_property.xml index 8196ffb2f5b..5bf2d3d7ce7 100644 --- a/estate/data/estate_property.xml +++ b/estate/data/estate_property.xml @@ -148,4 +148,12 @@ many2one res.partner + + + + x_property_tag_ids + Tags + many2many + x_estate.property.tag + diff --git a/estate/data/estate_property_tag.xml b/estate/data/estate_property_tag.xml new file mode 100644 index 00000000000..fe3c606d45d --- /dev/null +++ b/estate/data/estate_property_tag.xml @@ -0,0 +1,23 @@ + + + + + Estate Property Tag + x_estate.property.tag + + + + + x_name + Name + char + True + + + + + x_color + Color + integer + + diff --git a/estate/data/estate_property_type.xml b/estate/data/estate_property_type.xml index 2858005f6ea..62bdd16fa6d 100644 --- a/estate/data/estate_property_type.xml +++ b/estate/data/estate_property_type.xml @@ -1,4 +1,5 @@ + Estate Property Type diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index 2433d633642..c220ed57d5d 100644 --- a/estate/security/ir.model.access.csv +++ b/estate/security/ir.model.access.csv @@ -1,3 +1,4 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_x_estate_property,access_x_estate_property,model_estate_property,base.group_user,1,1,1,1 access_x_estate_property_type,access_x_estate_property_type,model_estate_property_type,base.group_user,1,1,1,1 +access_x_estate_property_tag,access_x_estate_property_tag,model_estate_property_tag,base.group_user,1,1,1,1 diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml index aae5a55153d..62c5c1d5ef4 100644 --- a/estate/views/estate_menus.xml +++ b/estate/views/estate_menus.xml @@ -8,6 +8,7 @@ + diff --git a/estate/views/estate_property_tag_views.xml b/estate/views/estate_property_tag_views.xml new file mode 100644 index 00000000000..a79aab6f69b --- /dev/null +++ b/estate/views/estate_property_tag_views.xml @@ -0,0 +1,19 @@ + + + + + Property Tags + x_estate.property.tag + list + + + + x_estate.property.tag.list + x_estate.property.tag + + + + + + + diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml index 0cfdef5f7fd..b20f579474c 100644 --- a/estate/views/estate_property_views.xml +++ b/estate/views/estate_property_views.xml @@ -32,6 +32,7 @@ + From 3855227138404c540d3bc853655c9f571d153be1 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Fri, 6 Jun 2025 10:33:49 +0200 Subject: [PATCH 07/12] [IMP] -created estate property offer model. -Added access rights to the model. -created list and form view to model. -Added offer ids field to estate property model, and added it to its view. --- estate/__manifest__.py | 3 ++ estate/data/estate_models.xml | 23 +++++++++ estate/data/estate_property.xml | 14 ++++-- estate/data/estate_property_offer.xml | 50 ++++++++++++++++++++ estate/data/estate_property_tag.xml | 5 -- estate/data/estate_property_type.xml | 5 -- estate/security/ir.model.access.csv | 1 + estate/views/estate_property_offer_views.xml | 40 ++++++++++++++++ estate/views/estate_property_views.xml | 6 +++ 9 files changed, 132 insertions(+), 15 deletions(-) create mode 100644 estate/data/estate_models.xml create mode 100644 estate/data/estate_property_offer.xml create mode 100644 estate/views/estate_property_offer_views.xml diff --git a/estate/__manifest__.py b/estate/__manifest__.py index c1cf5fbd823..4cc730587f2 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -7,13 +7,16 @@ 'base' ], 'data': [ + 'data/estate_models.xml', 'data/estate_property_type.xml', 'data/estate_property_tag.xml', + 'data/estate_property_offer.xml', 'data/estate_property.xml', 'security/ir.model.access.csv', 'views/estate_property_views.xml', 'views/estate_property_type_views.xml', 'views/estate_property_tag_views.xml', + 'views/estate_property_offer_views.xml', 'views/estate_menus.xml', ], 'license': 'OEEL-1', diff --git a/estate/data/estate_models.xml b/estate/data/estate_models.xml new file mode 100644 index 00000000000..a0b87a8573a --- /dev/null +++ b/estate/data/estate_models.xml @@ -0,0 +1,23 @@ + + + + Estate Property + x_estate.property + + + + Property Type + x_estate.property.type + + + + Property Tag + x_estate.property.tag + + + + + Property Offer + x_estate.property.offer + + diff --git a/estate/data/estate_property.xml b/estate/data/estate_property.xml index 5bf2d3d7ce7..54cf4ff1b6f 100644 --- a/estate/data/estate_property.xml +++ b/estate/data/estate_property.xml @@ -1,10 +1,5 @@ - - Estate Property - x_estate.property - - x_name @@ -156,4 +151,13 @@ many2many x_estate.property.tag + + + + x_property_offer_ids + Offers + one2many + x_estate.property.offer + x_property_id + diff --git a/estate/data/estate_property_offer.xml b/estate/data/estate_property_offer.xml new file mode 100644 index 00000000000..6588b1623f9 --- /dev/null +++ b/estate/data/estate_property_offer.xml @@ -0,0 +1,50 @@ + + + + + + x_price + Price + float + True + + + + + x_status + Status + selection + + + + + Accepted + accepted + + + + + Refused + refused + + + + + x_partner_id + Buyer + many2one + res.partner + True + cascade + + + + + x_property_id + Property + many2one + x_estate.property + True + cascade + + diff --git a/estate/data/estate_property_tag.xml b/estate/data/estate_property_tag.xml index fe3c606d45d..79e8dad392a 100644 --- a/estate/data/estate_property_tag.xml +++ b/estate/data/estate_property_tag.xml @@ -1,11 +1,6 @@ - - Estate Property Tag - x_estate.property.tag - - x_name diff --git a/estate/data/estate_property_type.xml b/estate/data/estate_property_type.xml index 62bdd16fa6d..bf287931241 100644 --- a/estate/data/estate_property_type.xml +++ b/estate/data/estate_property_type.xml @@ -1,11 +1,6 @@ - - Estate Property Type - x_estate.property.type - - x_name diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index c220ed57d5d..8e9091aff65 100644 --- a/estate/security/ir.model.access.csv +++ b/estate/security/ir.model.access.csv @@ -2,3 +2,4 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_x_estate_property,access_x_estate_property,model_estate_property,base.group_user,1,1,1,1 access_x_estate_property_type,access_x_estate_property_type,model_estate_property_type,base.group_user,1,1,1,1 access_x_estate_property_tag,access_x_estate_property_tag,model_estate_property_tag,base.group_user,1,1,1,1 +access_x_estate_property_offer,access_x_estate_property_offer,model_estate_property_offer,base.group_user,1,1,1,1 diff --git a/estate/views/estate_property_offer_views.xml b/estate/views/estate_property_offer_views.xml new file mode 100644 index 00000000000..acf42281336 --- /dev/null +++ b/estate/views/estate_property_offer_views.xml @@ -0,0 +1,40 @@ + + + + + Property Offers + x_estate.property.offer + [('x_property_type_id', '=', active_id)] + list,form + + + + x_estate.property.offer.list + x_estate.property.offer + + + + + + + + + + x_estate.property.offer.form + x_estate.property.offer + +
+ + + + + + + +
+
+
+
diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml index b20f579474c..7693da7f8fb 100644 --- a/estate/views/estate_property_views.xml +++ b/estate/views/estate_property_views.xml @@ -56,6 +56,12 @@
+ + + + + + From d70d365b6404c5e4cbe3e02cef000f1cedca8999 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Fri, 6 Jun 2025 11:04:46 +0200 Subject: [PATCH 08/12] [IMP] -Added total area field to estate property model and a computed field to evaluate its value. -Added the new field to the models form view. --- estate/data/estate_property.xml | 12 ++++++++++++ estate/views/estate_property_views.xml | 1 + 2 files changed, 13 insertions(+) diff --git a/estate/data/estate_property.xml b/estate/data/estate_property.xml index 54cf4ff1b6f..cc90fe66220 100644 --- a/estate/data/estate_property.xml +++ b/estate/data/estate_property.xml @@ -160,4 +160,16 @@ x_estate.property.offer x_property_id + + + + x_total_area + Total Area + float + x_living_area,x_garden_area + + diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml index 7693da7f8fb..3b5d0511295 100644 --- a/estate/views/estate_property_views.xml +++ b/estate/views/estate_property_views.xml @@ -53,6 +53,7 @@ + From a9cb5f0738a98a3ee892aa2c8c0ebe9219a2fb04 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Fri, 6 Jun 2025 11:39:08 +0200 Subject: [PATCH 09/12] [IMP] -Added a related field in estate property model for the buyer's country. -Added the field to the model's form view. --- estate/data/estate_models.xml | 1 - estate/data/estate_property.xml | 21 +++++++++++++++------ estate/views/estate_property_views.xml | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/estate/data/estate_models.xml b/estate/data/estate_models.xml index a0b87a8573a..ace84bcb3eb 100644 --- a/estate/data/estate_models.xml +++ b/estate/data/estate_models.xml @@ -15,7 +15,6 @@ x_estate.property.tag - Property Offer x_estate.property.offer diff --git a/estate/data/estate_property.xml b/estate/data/estate_property.xml index cc90fe66220..1c090c7976e 100644 --- a/estate/data/estate_property.xml +++ b/estate/data/estate_property.xml @@ -118,7 +118,7 @@ west - + x_property_type_id Type @@ -128,7 +128,7 @@ restrict - + x_partner_id Buyer @@ -136,7 +136,7 @@ res.partner - + x_user_id Salesperson @@ -144,7 +144,7 @@ res.partner - + x_property_tag_ids Tags @@ -152,7 +152,7 @@ x_estate.property.tag - + x_property_offer_ids Offers @@ -161,7 +161,7 @@ x_property_id - + x_total_area Total Area @@ -172,4 +172,13 @@ for property in self: property['x_total_area'] = property.x_living_area + property.x_garden_area ]]> + + + + x_country_id + Buyer's Country + many2one + res.country + x_partner_id.country_id + diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml index 3b5d0511295..93d48aeaf8c 100644 --- a/estate/views/estate_property_views.xml +++ b/estate/views/estate_property_views.xml @@ -67,6 +67,7 @@ + From 6aa6dc074c2a5a747230ddf5c02790e2466222b3 Mon Sep 17 00:00:00 2001 From: abdrahmanrashed Date: Fri, 6 Jun 2025 14:57:04 +0200 Subject: [PATCH 10/12] [IMP] -Added an action in estate property offer for accepting an offer. -Added the action to a button in estate property view. --- estate/data/estate_property_offer.xml | 14 ++++++++++++++ estate/views/estate_property_offer_views.xml | 1 + 2 files changed, 15 insertions(+) diff --git a/estate/data/estate_property_offer.xml b/estate/data/estate_property_offer.xml index 6588b1623f9..ce9df0a2130 100644 --- a/estate/data/estate_property_offer.xml +++ b/estate/data/estate_property_offer.xml @@ -47,4 +47,18 @@ True cascade + + + + x_action_accept_offer + code + + diff --git a/estate/views/estate_property_offer_views.xml b/estate/views/estate_property_offer_views.xml index acf42281336..014317de95c 100644 --- a/estate/views/estate_property_offer_views.xml +++ b/estate/views/estate_property_offer_views.xml @@ -18,6 +18,7 @@ editable="top"> +