From 4b07a149376f83089967ddbcd384f984feb6b806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Scaraf=C3=ADa?= Date: Wed, 28 Dec 2016 13:31:05 -0300 Subject: [PATCH] [9.0][MIG] Improove migration from v8 of base_report_to_printer (#71) * [9.0][MIG] Improove migration from v8 of base_report_to_printer * REF use shorten headers --- .../migrations/9.0.1.0.0/pre-migration.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 base_report_to_printer/migrations/9.0.1.0.0/pre-migration.py diff --git a/base_report_to_printer/migrations/9.0.1.0.0/pre-migration.py b/base_report_to_printer/migrations/9.0.1.0.0/pre-migration.py new file mode 100644 index 0000000..b4621e0 --- /dev/null +++ b/base_report_to_printer/migrations/9.0.1.0.0/pre-migration.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 ADHOC SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + +xmlid_renames = [ + ( + 'base_report_to_printer.res_groups_printingprintoperator0', + 'base_report_to_printer.printing_server_group_manager', + ), + ( + 'base_report_to_printer.ir_model_access_printingprintergroup1', + 'base_report_to_printer.printing_printer_group_manager', + ), + ( + 'base_report_to_printer.ir_model_access_printing_action', + 'base_report_to_printer.printing_action_group_manager', + ), + ( + 'base_report_to_printer.ir_model_access_printingreportxmlaction', + 'base_report_to_printer.printing_report_xml_action_group_manager', + ), +] + + +@openupgrade.migrate() +def migrate(cr, version): + openupgrade.rename_xmlids(cr, xmlid_renames)