fix: check if item is dropshipped before updating quantity (backport #54825) (#54827)

fix: check if item is dropshipped before updating quantity (#54825)

(cherry picked from commit 23e9ad3fd9)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
mergify[bot]
2026-05-11 08:08:09 +00:00
committed by GitHub
parent f24b556336
commit 0db7e1e56b

View File

@@ -588,6 +588,13 @@ class PurchaseOrder(BuyingController):
_("Item with name {0} not found in the Purchase Order").format(frappe.bold(d.get("name")))
)
if not item.delivered_by_supplier:
frappe.throw(
_(
"Item {0} is not a drop ship item. Only drop ship items can have Delivered Qty updated."
).format(frappe.bold(item.item_code))
)
if not item.has_permlevel_access_to("received_qty", permission_type="write"):
frappe.throw(
_("You don't have permission to update Received Qty DocField for item {0}").format(