commit | b966c06a4f7ec1d64e475a626ee934695c77a2a4 | [log] [tgz] |
---|---|---|
author | rohitwaghchaure <rohitw1991@gmail.com> | Mon Feb 12 12:49:09 2024 +0530 |
committer | GitHub <noreply@github.com> | Mon Feb 12 12:49:09 2024 +0530 |
tree | 9df20ed6ca73b9a65b2108b58605a0dcaa3566c9 | |
parent | 2ee642fb2c8a0317720c4aeb62ea09ce7ed1e39b [diff] [blame] |
perf: cached get_last_purchase_details to fix performance issue (#39854)
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 61eb0f6..8ffbaa1 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py
@@ -942,6 +942,9 @@ "Stock Reconciliation", ) + if not frappe.get_all("Putaway Rule", limit=1): + return + if self.doctype == "Purchase Invoice" and self.get("update_stock") == 0: valid_doctype = False