summaryrefslogtreecommitdiff
path: root/addons/theme_default/data/theme_default_data.xml
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2019-10-15 13:07:03 +0000
committerAdrian Torres <adt@odoo.com>2019-11-07 08:39:17 +0000
commitf9eeb3b44e2c89e14c035fafe147133d6a3eb040 (patch)
tree49f5cadb863c31e03ad9defb5ce2344694bf0e62 /addons/theme_default/data/theme_default_data.xml
parent3da477dfc5f98f092cda1ead73ea87372fac6bd2 (diff)
[FIX] base: restrict m2o with ir models as inverses
Before this revision, any m2o with an ir.* model as inverse could have the ondelete policy as 'restrict', either by default if it was required or by setting it explicitly in the field declaration. This is problematic because ir.* models are reflection models and they *MUST* be deleted during an uninstall of the module that introduces them, otherwise tables, fields, constraints, etc. are left in the database, this is why 'restrict' doesn't make sense UNLESS the unlink is being performed by an user and not by the system (uninstall). As a solution, this revision sets the default to cascade if the field is required, otherwise null. If the programmer explicitly sets a required m2o field with an ir.* model as an inverse to ondelete='restrict', it is considered an unsupported use-case and the registry will crash during loading with a clear error explaining that it is not supported. closes odoo/odoo#39739 Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Diffstat (limited to 'addons/theme_default/data/theme_default_data.xml')
0 files changed, 0 insertions, 0 deletions