diff --git a/addons/l10n_ch/__manifest__.py b/addons/l10n_ch/__manifest__.py index f5d3be898cb..ef172d008bb 100644 --- a/addons/l10n_ch/__manifest__.py +++ b/addons/l10n_ch/__manifest__.py @@ -19,7 +19,7 @@ A QR-bill will be generated if: The generation of the QR-bill is automatic if you meet the previous criteria. The QR-bill will be appended after the invoice when printing or sending by mail. """, - 'version': '11.1', + 'version': '11.2', 'category': 'Accounting/Localizations/Account Charts', 'depends': [ 'account', diff --git a/addons/l10n_ch/migrations/11.2/pre-migrate.py b/addons/l10n_ch/migrations/11.2/pre-migrate.py new file mode 100644 index 00000000000..d8c92761b81 --- /dev/null +++ b/addons/l10n_ch/migrations/11.2/pre-migrate.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + + +def migrate(cr, version): + cr.execute("SELECT res_id FROM ir_model_data WHERE module = 'l10n_ch' AND name='account_tax_report_line_chtax_solde_formula'") + + expression_id = cr.fetchone() + + if expression_id: + cr.execute( + "DELETE FROM account_report_external_value WHERE target_report_expression_id = %s", + [expression_id[0]] + )