From 97b55889629991585b53bd56cd2bec99de7c6cb8 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Wed, 6 Sep 2017 11:08:01 +0200 Subject: [PATCH] [FIX][mass_editing] Allow to delete models Without this fix, it is impossible to uninstall an addon that removes a model for which we had a `mass.object`. --- mass_editing/README.rst | 1 + mass_editing/__manifest__.py | 3 ++- mass_editing/models/mass_object.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mass_editing/README.rst b/mass_editing/README.rst index f498e3472..8e6608601 100644 --- a/mass_editing/README.rst +++ b/mass_editing/README.rst @@ -91,6 +91,7 @@ Contributors * Oihane Crucelaegui * Serpent Consulting Services Pvt. Ltd. +* Jairo Llopis Maintainer ---------- diff --git a/mass_editing/__manifest__.py b/mass_editing/__manifest__.py index b8d4ab280..949e127f8 100644 --- a/mass_editing/__manifest__.py +++ b/mass_editing/__manifest__.py @@ -3,8 +3,9 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Mass Editing', - 'version': '10.0.1.0.0', + 'version': '10.0.1.1.0', 'author': 'Serpent Consulting Services Pvt. Ltd., ' + 'Tecnativa, ' 'Odoo Community Association (OCA)', 'contributors': [ 'Oihane Crucelaegui ', diff --git a/mass_editing/models/mass_object.py b/mass_editing/models/mass_object.py index 80d07e64c..ddeba4d9e 100644 --- a/mass_editing/models/mass_object.py +++ b/mass_editing/models/mass_object.py @@ -11,6 +11,7 @@ class MassObject(models.Model): name = fields.Char('Name', required=True, index=1) model_id = fields.Many2one('ir.model', 'Model', required=True, + ondelete="cascade", help="Model is used for Selecting Fields. " "This is editable until Sidebar menu " "is not created.")