From 7249657d15323ba089f2aa20e77e6bd5aae4ba76 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 9 Jan 2023 14:53:54 +0530 Subject: [PATCH] fix: timeout error in the Purchase Invoice --- erpnext/controllers/buying_controller.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 7989a40a3d..fd30e61295 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -274,6 +274,11 @@ class BuyingController(SubcontractingController): if self.doctype not in ("Purchase Receipt", "Purchase Invoice", "Purchase Order"): return + if ( + self.doctype == "Purchase Invoice" and not self.update_stock and not self.is_internal_transfer() + ): + return + ref_doctype_map = { "Purchase Order": "Sales Order Item", "Purchase Receipt": "Delivery Note Item",