From 074b7320efaeb8b784db58e02db086850f169331 Mon Sep 17 00:00:00 2001 From: aheficent Date: Tue, 20 Jun 2017 14:01:59 +0200 Subject: [PATCH] [FIX]account voucher. Delete inherited views first --- addons/account_voucher/migrations/9.0.1.0/pre-migration.py | 7 +++++++ 1 file changed, 7 insertions(+) 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