mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[REF] rma: change stock_move_forced_lot to stock_restrict_lot
The two modules have the same features, but the stock_restrict_lot is more used in other modules so changing the module used to match the OCA behavior.
This commit is contained in:
@@ -3,14 +3,14 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "RMA (Return Merchandise Authorization)",
|
"name": "RMA (Return Merchandise Authorization)",
|
||||||
"version": "14.0.1.1.1",
|
"version": "14.0.1.1.2",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"category": "RMA",
|
"category": "RMA",
|
||||||
"summary": "Introduces the return merchandise authorization (RMA) process "
|
"summary": "Introduces the return merchandise authorization (RMA) process "
|
||||||
"in odoo",
|
"in odoo",
|
||||||
"author": "ForgeFlow",
|
"author": "ForgeFlow",
|
||||||
"website": "https://github.com/ForgeFlow/stock-rma",
|
"website": "https://github.com/ForgeFlow/stock-rma",
|
||||||
"depends": ["stock", "mail", "web", "stock_move_forced_lot"],
|
"depends": ["stock", "mail", "web", "stock_restrict_lot"],
|
||||||
"demo": ["demo/stock_demo.xml"],
|
"demo": ["demo/stock_demo.xml"],
|
||||||
"data": [
|
"data": [
|
||||||
"security/rma.xml",
|
"security/rma.xml",
|
||||||
|
|||||||
18
rma/migrations/14.0.1.1.2/pre-migration.py
Normal file
18
rma/migrations/14.0.1.1.2/pre-migration.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (C) 2025 ForgeFlow S.L.
|
||||||
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
|
||||||
|
|
||||||
|
from openupgradelib import openupgrade # pylint: disable=W7936
|
||||||
|
|
||||||
|
_field_renames = [
|
||||||
|
("stock.move", "stock_move", "forced_lot_id", "restrict_lot_id"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@openupgrade.migrate()
|
||||||
|
def migrate(env, version):
|
||||||
|
cr = env.cr
|
||||||
|
for field in _field_renames:
|
||||||
|
if openupgrade.table_exists(cr, field[1]) and openupgrade.column_exists(
|
||||||
|
cr, field[1], field[2]
|
||||||
|
):
|
||||||
|
openupgrade.rename_fields(env, [field])
|
||||||
Reference in New Issue
Block a user