You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
468 B

  1. # -*- coding: utf-8 -*-
  2. # © 2017 Akretion, Mourad EL HADJ MIMOUNE
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. from openupgradelib import openupgrade
  5. @openupgrade.migrate(use_env=True)
  6. def migrate(env, version):
  7. cr = env.cr
  8. if openupgrade.table_exists(cr, 'sale_exception'):
  9. openupgrade.rename_tables(cr, [('sale_exception', 'exception_rule')])
  10. openupgrade.rename_models(cr, [('sale.exception', 'exception.rule')])