diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/l10n_ch/migrations | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/l10n_ch/migrations')
| -rw-r--r-- | addons/l10n_ch/migrations/0.0.0/pre-migrate-qr-template.py | 20 | ||||
| -rw-r--r-- | addons/l10n_ch/migrations/9.0.9.0/pre-set_tags_and_taxes_updatable.py | 9 |
2 files changed, 29 insertions, 0 deletions
diff --git a/addons/l10n_ch/migrations/0.0.0/pre-migrate-qr-template.py b/addons/l10n_ch/migrations/0.0.0/pre-migrate-qr-template.py new file mode 100644 index 00000000..070450f8 --- /dev/null +++ b/addons/l10n_ch/migrations/0.0.0/pre-migrate-qr-template.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + + +def migrate(cr, version): + """ From 12.0, to saas-13.3, l10n_ch_swissqr_template + used to inherit from another template. This isn't the case + anymore since https://github.com/odoo/odoo/commit/719f087b1b5be5f1f276a0f87670830d073f6ef4 + (made in 12.0, and forward-ported). The module will not be updatable if we + don't manually clean inherit_id. + """ + cr.execute(""" + update ir_ui_view v + set inherit_id = NULL, mode='primary' + from ir_model_data mdata + where + v.id = mdata.res_id + and mdata.model= 'ir.ui.view' + and mdata.name = 'l10n_ch_swissqr_template' + and mdata.module='l10n_ch'; + """)
\ No newline at end of file diff --git a/addons/l10n_ch/migrations/9.0.9.0/pre-set_tags_and_taxes_updatable.py b/addons/l10n_ch/migrations/9.0.9.0/pre-set_tags_and_taxes_updatable.py new file mode 100644 index 00000000..8f7c27ef --- /dev/null +++ b/addons/l10n_ch/migrations/9.0.9.0/pre-set_tags_and_taxes_updatable.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +import odoo + +def migrate(cr, version): + registry = odoo.registry(cr.dbname) + from odoo.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable + migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_ch') + |
