Debian Codegraph @

addons/l10n_ch/migrations/0.0.0/pre-migrate-qr-template.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2
3
4 def migrate(cr, version):
5 """ From 12.0, to saas-13.3, l10n_ch_swissqr_template
6 used to inherit from another template. This isn't the case
7 anymore since https://github.com/odoo/odoo/commit/719f087b1b5be5f1f276a0f87670830d073f6ef4
8 (made in 12.0, and forward-ported). The module will not be updatable if we
9 don't manually clean inherit_id.
10 """
11 cr.execute("""
12 update ir_ui_view v
13 set inherit_id = NULL, mode='primary'
14 from ir_model_data mdata
15 where
16 v.id = mdata.res_id
17 and mdata.model= 'ir.ui.view'
18 and mdata.name = 'l10n_ch_swissqr_template'
19 and mdata.module='l10n_ch';
20 """)