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

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