-
-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by MiquelRForgeFlow
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
openupgrade_scripts/scripts/purchase_requisition_stock/15.0.1.2/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2024 Tecnativa - Víctor Martínez | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
"""The module purchase_requisition_grouped_by_procurement previously added | ||
group_id column in previous version. Now procurement_group_id field exists.""" | ||
if openupgrade.is_module_installed( | ||
env.cr, "purchase_requisition_grouped_by_procurement" | ||
): | ||
openupgrade.rename_fields( | ||
env, | ||
[ | ||
( | ||
"purchase.requisition", | ||
"purchase_requisition", | ||
"group_id", | ||
"procurement_group_id", | ||
), | ||
], | ||
) |