| 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | |
| 4 | def migrate(cr, version): |
| 5 | cr.execute("SELECT res_id FROM ir_model_data WHERE module = 'l10n_ch' AND name='account_tax_report_line_chtax_solde_formula'") |
| 6 | |
| 7 | expression_id = cr.fetchone() |
| 8 | |
| 9 | if expression_id: |
| 10 | cr.execute( |
| 11 | "DELETE FROM account_report_external_value WHERE target_report_expression_id = %s", |
| 12 | [expression_id[0]] |
| 13 | ) |