From e0e80f7eedffe8e49248ef0d3e5ae8a1b1c91321 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:16:57 +0530 Subject: [PATCH] fix: not able to cancel purchase receipt for old subcontracting flow (backport #40298) (#40302) fix: not able to cancel purchase receipt for old subcontracting flow (#40298) (cherry picked from commit 48da952fd7d0a2d7b76b01f290e1ccb7584fa2d4) Co-authored-by: rohitwaghchaure --- erpnext/controllers/buying_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 91ee53a796e..821185766eb 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -559,7 +559,7 @@ class BuyingController(SubcontractingController): { "incoming_rate": incoming_rate, "recalculate_rate": 1 - if (self.is_subcontracted and (d.bom or d.fg_item)) or d.from_warehouse + if (self.is_subcontracted and (d.bom or d.get("fg_item"))) or d.from_warehouse else 0, } )