Skip to content

Commit

Permalink
Merge 5030b9d into 453c013
Browse files Browse the repository at this point in the history
  • Loading branch information
MiquelRForgeFlow committed Feb 3, 2020
2 parents 453c013 + 5030b9d commit b4cd5c9
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions partner_statement/migrations/12.0.1.0.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2019 Eficent <http://www.eficent.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


def rename_wizards(cr):
if openupgrade.table_exists(cr, 'customer_activity_statement_wizard'):
openupgrade.rename_tables(cr, [(
'customer_activity_statement_wizard',
'activity_statement_wizard'),
])
openupgrade.rename_models(cr, [(
'customer.activity.statement.wizard',
'activity.statement.wizard'),
])
if openupgrade.table_exists(cr, 'customer_outstanding_statement_wizard'):
openupgrade.rename_tables(cr, [(
'customer_outstanding_statement_wizard',
'outstanding_statement_wizard'),
])
openupgrade.rename_models(cr, [(
'customer.outstanding.statement.wizard',
'outstanding.statement.wizard'),
])


@openupgrade.migrate()
def migrate(env, version):
rename_wizards(env.cr)

0 comments on commit b4cd5c9

Please sign in to comment.