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.

25 lines
892 B

  1. # Copyright 2018 Eficent Business and IT Consulting Services, S.L.
  2. # Copyright 2019 Tecnativa - Pedro M. Baeza
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. from openupgradelib import openupgrade
  5. _xmlid_renames = [
  6. ('partner_industry_secondary.group_use_partner_sector_for_person',
  7. 'partner_industry_secondary.group_use_partner_industry_for_person'),
  8. ]
  9. @openupgrade.migrate()
  10. def migrate(env, version):
  11. openupgrade.rename_xmlids(env.cr, _xmlid_renames)
  12. # No need to check existence, as if getting to this, it will exist
  13. openupgrade.rename_tables(
  14. env.cr, [('res_partner_res_partner_sector_rel',
  15. 'res_partner_res_partner_industry_rel')],
  16. )
  17. openupgrade.rename_columns(env.cr, {
  18. 'res_partner_res_partner_industry_rel': [
  19. ('res_partner_sector_id', 'res_partner_industry_id'),
  20. ]
  21. })