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.

11 lines
439 B

  1. # Copyright 2021 Open Source Integrators
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  3. from odoo.tools.sql import column_exists, rename_column
  4. def migrate(cr, version):
  5. if column_exists(cr, "res_partner", "state"):
  6. if column_exists(cr, "res_partner", "old_state"):
  7. cr.execute("ALTER TABLE res_partner DROP COLUMN old_state")
  8. rename_column(cr, "res_partner", "state", "old_state")