Skip to content

Commit

Permalink
Merge PR #3321 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Mar 4, 2023
2 parents 748a6d8 + 074a843 commit 7907f0a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docsource/modules140-150.rst
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ Module coverage 14.0 -> 15.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| purchase_requisition |Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| purchase_requisition_stock | | |
| purchase_requisition_stock |Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| |new| purchase_requisition_stock_dropshipping | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.logged_query(
env.cr,
"""
WITH subquery as (
SELECT op.name as origin, p.id as pid
FROM stock_warehouse_orderpoint AS op
LEFT JOIN procurement_group AS p ON op.group_id = p.id
)
UPDATE purchase_requisition as requisition
SET procurement_group_id = subquery.pid
FROM subquery
WHERE requisition.origin = subquery.origin;
""",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---Models in module 'purchase_requisition_stock'---
---Fields in module 'purchase_requisition_stock'---
purchase_requisition_stock / purchase.requisition / procurement_group_id (many2one): NEW relation: procurement.group
# DONE: post-migration: fill data from stock.warehouse.orderpoint

---XML records in module 'purchase_requisition_stock'---

0 comments on commit 7907f0a

Please sign in to comment.