fix: not able to submit the PO (backport #54257) (#54261)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2026-04-13 21:44:12 +05:30
committed by GitHub
parent 2c292f4770
commit 9d90fc4a84

View File

@@ -341,7 +341,7 @@ class StatusUpdater(Document):
item_details.extend(self.fetch_items_with_pending_qty(args, "item_code", regular_items))
# Query production plan items with production_item field
if pp_items:
if pp_items and args.get("target_dt") in ["Production Plan Sub Assembly Item"]:
item_details.extend(self.fetch_items_with_pending_qty(args, "production_item", pp_items))
item_lookup = {item.name: item for item in item_details}