fix: add condition to check if item is delivered by supplier in make_purchase_order_for_default_supplier() (backport #45370) (#45410)

fix: add condition to check if item is delivered by supplier in make_purchase_order_for_default_supplier() (#45370)

(cherry picked from commit 69464ab7ff)

Co-authored-by: Shanuka Hewage <89955436+Shanuka-98@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2025-01-23 18:18:48 +05:30
committed by GitHub
parent 73a21c294c
commit 5d7d3d8c19

View File

@@ -1357,7 +1357,8 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t
"postprocess": update_item,
"condition": lambda doc: doc.ordered_qty < doc.stock_qty
and doc.supplier == supplier
and doc.item_code in items_to_map,
and doc.item_code in items_to_map
and doc.delivered_by_supplier == 1,
},
},
target_doc,