mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[MIG] rma_reason_code: Migration to 17.0
This commit is contained in:
17
rma_reason_code/migrations/17.0.1.0.0/pre-migration.py
Normal file
17
rma_reason_code/migrations/17.0.1.0.0/pre-migration.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
if openupgrade.column_exists(env.cr, "rma_reason_code", "type"):
|
||||
openupgrade.rename_fields(
|
||||
env,
|
||||
[
|
||||
(
|
||||
"rma.reason.code",
|
||||
"rma_reason_code",
|
||||
"type",
|
||||
"rma_type",
|
||||
)
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user