From 0d51405007058c5aa6fa8bda50bec1c846b84656 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 19 Dec 2016 13:41:24 +0100 Subject: [PATCH] [IMP] contract: Migration script from 8.0 account_analytic_analysis --- .../migrations/9.0.1.0.0/pre-migration.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 contract/migrations/9.0.1.0.0/pre-migration.py diff --git a/contract/migrations/9.0.1.0.0/pre-migration.py b/contract/migrations/9.0.1.0.0/pre-migration.py new file mode 100644 index 00000000..db7adafa --- /dev/null +++ b/contract/migrations/9.0.1.0.0/pre-migration.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + +column_copys = { + 'account_analytic_account': [ + (openupgrade.get_legacy_name('date_start'), 'date_start', None), + ], +} + + +@openupgrade.migrate() +def migrate(cr, version): + openupgrade.copy_columns(cr, column_copys) + openupgrade.update_module_names( + cr, [ + ('hr_timesheet_invoice', 'contract'), + ('contract_journal', 'contract'), + ('contract_discount', 'contract'), + ('contract_recurring_invoicing_marker', 'contract'), + ('contract_recurring_invoicing_monthly_last_day', 'contract'), + ('contract_show_recurring_invoice', 'contract'), + ], merge_modules=True, + )