From 415367e393b28b058e53c01bb1c385a63f5fae0b Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Tue, 27 Sep 2022 20:20:31 +0530 Subject: [PATCH] [UPDT] Sep 27 : Dynamic field bug fix --- all_in_one_dynamic_custom_fields/__manifest__.py | 2 +- all_in_one_dynamic_custom_fields/models/dynamic_fields.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/all_in_one_dynamic_custom_fields/__manifest__.py b/all_in_one_dynamic_custom_fields/__manifest__.py index 56f223881..1178645be 100644 --- a/all_in_one_dynamic_custom_fields/__manifest__.py +++ b/all_in_one_dynamic_custom_fields/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'All in One Dynamic Fields', - 'version': '15.0.1.0.0', + 'version': '15.0.1.0.1', 'summary': 'Create Custom Fields As Per Your Need Without Any Coding.', 'description': 'All in One Dynamic Fields, All in One Custom Fields, Dynamic Fields, Custom Fields, Create Fields Dynamically', 'category': 'Extra Tools', diff --git a/all_in_one_dynamic_custom_fields/models/dynamic_fields.py b/all_in_one_dynamic_custom_fields/models/dynamic_fields.py index d4958e2c5..0d32ecc85 100644 --- a/all_in_one_dynamic_custom_fields/models/dynamic_fields.py +++ b/all_in_one_dynamic_custom_fields/models/dynamic_fields.py @@ -207,3 +207,11 @@ class DynamicFields(models.Model): else: return {'domain': {'widget': [('id', '=', False)]}} return {'domain': {'widget': [('id', '=', False)]}} + + def unlink(self): + if self.form_view_id: + self.form_view_id.active = False + if self.tree_view_id: + self.tree_view_id.active = False + res = super(DynamicFields, self).unlink() + return res \ No newline at end of file