mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[ADD] migration script, change model name from reason.code to scrap.reason.code
This commit is contained in:
committed by
Pierrick Brun
parent
d869699f1c
commit
fb0b08c270
14
scrap_reason_code/migrations/13.0.1.1.0/pre-migration.py
Normal file
14
scrap_reason_code/migrations/13.0.1.1.0/pre-migration.py
Normal 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)
|
||||
Reference in New Issue
Block a user