summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2020-02-20 13:43:00 +0000
committerRaphael Collet <rco@odoo.com>2020-03-30 13:42:04 +0000
commit1daf8eb12735db5c697e4a0868b43fe44f6b2f6a (patch)
treeb02820d3679615e7e92a6258a6cc1d428db4c526 /addons/web
parentf0481392c6501cae2c38359f526da1eefa451337 (diff)
[FIX] *: set ondelete policy of required Selection fields
With this commit, Selection fields with `required=True` which are extended via `selection_add` are given proper ondelete policies to ensure the cleanup of records containing these extended options during uninstall of the extending module. This commit also cleans up leftover uninstall hooks that were being used to handle the same set of problems prior to the ondelete mechanism being implemented for Selection fields. closes odoo/odoo#46325 Related: odoo/enterprise#9117 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/web')
-rw-r--r--addons/web/models/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/models/models.py b/addons/web/models/models.py
index 7f6e83554e3..bb9a865f161 100644
--- a/addons/web/models/models.py
+++ b/addons/web/models/models.py
@@ -14,7 +14,9 @@ from odoo.exceptions import UserError
class IrActionsActWindowView(models.Model):
_inherit = 'ir.actions.act_window.view'
- view_mode = fields.Selection(selection_add=[('qweb', 'QWeb')])
+ view_mode = fields.Selection(selection_add=[
+ ('qweb', 'QWeb')
+ ], ondelete={'qweb': 'cascade'})
class Base(models.AbstractModel):