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.

29 lines
1004 B

  1. # Copyright 2019 Eficent <http://www.eficent.com>
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from openupgradelib import openupgrade
  4. def rename_wizards(cr):
  5. if openupgrade.table_exists(cr, 'customer_activity_statement_wizard'):
  6. openupgrade.rename_tables(cr, [(
  7. 'customer_activity_statement_wizard',
  8. 'activity_statement_wizard'),
  9. ])
  10. openupgrade.rename_models(cr, [(
  11. 'customer.activity.statement.wizard',
  12. 'activity.statement.wizard'),
  13. ])
  14. if openupgrade.table_exists(cr, 'customer_outstanding_statement_wizard'):
  15. openupgrade.rename_tables(cr, [(
  16. 'customer_outstanding_statement_wizard',
  17. 'outstanding_statement_wizard'),
  18. ])
  19. openupgrade.rename_models(cr, [(
  20. 'customer.outstanding.statement.wizard',
  21. 'outstanding.statement.wizard'),
  22. ])
  23. @openupgrade.migrate()
  24. def migrate(env, version):
  25. rename_wizards(env.cr)