[ADD] migration script, change model name from reason.code to scrap.reason.code

This commit is contained in:
Bhavesh Odedra
2020-03-27 17:37:22 +05:30
committed by Pierrick Brun
parent d869699f1c
commit fb0b08c270
10 changed files with 49 additions and 30 deletions

View File

@@ -0,0 +1,14 @@
# Copyright (C) 2019 IBM Corp.
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
_model_renames = [
("reason.code", "scrap.reason.code"),
]
@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_models(env.cr, _model_renames)