From 576fb562144f259ec54d776c873c423345c80777 Mon Sep 17 00:00:00 2001 From: yasp-odoo Date: Wed, 21 Aug 2024 18:53:02 +0530 Subject: [PATCH] [ADD] estate_account: override action_sold to create invoices - Created estate_account module to link estate and account modules. - In estate_property.py, inherited estate.property model. - Overrode action_sold method to return the super call. --- estate/security/ir.model.access.csv | 2 +- estate/views/estate_property_views.xml | 76 ++++++++++++++++-------- estate_account/__init__.py | 1 + estate_account/__manifest__.py | 13 ++++ estate_account/models/__init__.py | 1 + estate_account/models/estate_property.py | 27 +++++++++ 6 files changed, 93 insertions(+), 27 deletions(-) create mode 100644 estate_account/__init__.py create mode 100644 estate_account/__manifest__.py create mode 100644 estate_account/models/__init__.py create mode 100644 estate_account/models/estate_property.py diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv index 05bd9eefba..89f97c5084 100644 --- a/estate/security/ir.model.access.csv +++ b/estate/security/ir.model.access.csv @@ -2,4 +2,4 @@ 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 access_estate_property_tag,access_estate_property_tag,model_estate_property_tag,base.group_user,1,1,1,1 -access_estate_property_offer,access_estate_property_offer,model_estate_property_offer,base.group_user,1,1,1,1 \ No newline at end of file +access_estate_property_offer,access_estate_property_offer,model_estate_property_offer,base.group_user,1,1,1,1 diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml index 6e2e6c1492..4dfe7e165e 100644 --- a/estate/views/estate_property_views.xml +++ b/estate/views/estate_property_views.xml @@ -3,28 +3,42 @@ Properties estate.property - tree,form + tree,form,kanban {'search_default_available_properties':1} - + + estate.property.kanban + estate.property + + + + +
+ +
+
+
+
+
+
estate.property.list estate.property + decoration-success="state in ['offer_accepted', 'offer_received']" + decoration-muted="state == 'sold'" + decoration-bf="state == 'offer_accepted'"> - + - + @@ -36,23 +50,27 @@ estate.property
- +
-
- - - - + + + + - + @@ -62,8 +80,7 @@ - x`x` - + x`x` @@ -71,27 +88,34 @@ - - + + - - - + + +