From 48da952fd7d0a2d7b76b01f290e1ccb7584fa2d4 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 6 Mar 2024 12:51:04 +0530 Subject: [PATCH] fix: not able to cancel purchase receipt for old subcontracting flow (#40298) --- 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, } )