[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:
DavidJForgeFlow
2025-01-21 09:03:41 +01:00
parent f9a77f7c0f
commit b84b9badda
2 changed files with 20 additions and 2 deletions

View File

@@ -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",

View 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])