Skip to content

Commit

Permalink
[OU-ADD] purchase_requisition_stock: purchase_requisition_grouped_by_…
Browse files Browse the repository at this point in the history
…procurement compatibility

Rename group_id column from purchase.requisition to procurement_group_id

TT41760
  • Loading branch information
victoralmau committed Mar 19, 2024
1 parent e428b19 commit d751745
Showing 1 changed file with 23 additions and 0 deletions.
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",
),
],
)

0 comments on commit d751745

Please sign in to comment.