diff options
| author | Adrian Torres <adt@odoo.com> | 2019-05-03 07:50:02 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2019-05-03 07:50:02 +0000 |
| commit | d47f0ddbe47e065144f5dfc8b13691394366250d (patch) | |
| tree | 21aa2c854e04732727a8f0d7909d72c386a95cd0 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 27aabeaad55eb5066b075497df87a89434973d00 (diff) | |
[FIX] base: force unlink during uninstall
This commit is a followup to #25854
If a custom relational field is in a view and the field it references is
in another module and this module is uninstalled, the registry will
crash.
This is not because the ORM doesn't properly cascade-delete the field,
it tries to, but since the field is in a not-to-be-deleted view, the
unlinking of the field is interrupted and an error is raised to prevent
the breakage of the view.
However, module install/upgrade/uninstall cannot be stopped by such
errors and once the registry is reloaded, it crashes because it cannot
find the referenced field.
The solution, while not ideal, is to force the deletion of the field if
we're in uninstall mode... This means that the view in question will be
broken until the field is manually removed from the view, but a broken
view can be dealt with more easily than a broken registry.
opw-1974362
closes odoo/odoo#33130
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
