diff --git a/addons/account_voucher/migrations/9.0.1.0/pre-migration.py b/addons/account_voucher/migrations/9.0.1.0/pre-migration.py index 1eeb615c653c..7f2793ab03f8 100644 --- a/addons/account_voucher/migrations/9.0.1.0/pre-migration.py +++ b/addons/account_voucher/migrations/9.0.1.0/pre-migration.py @@ -12,6 +12,13 @@ def delete_payment_views(cr): """Delete account.voucher payment views that hinder upgrade.""" + cr.execute( + """\ + DELETE FROM ir_ui_view + WHERE inherit_id in ( + SELECT id FROM ir_ui_view WHERE name like '%account.voucher.payment%') + """ + ) cr.execute( """\ DELETE FROM ir_ui_view