perf: Use lazy loaded documents (#48017)

* perf: Use lazy docs for status updaters and similar use cases

* perf: lazy load documents while reposting
This commit is contained in:
Ankush Menat
2025-06-11 15:57:08 +05:30
committed by GitHub
parent 76982fe133
commit d16a6d42a5
17 changed files with 44 additions and 47 deletions

View File

@@ -793,7 +793,7 @@ class BuyingController(SubcontractingController):
for po, po_item_rows in po_map.items():
if po and po_item_rows:
po_obj = frappe.get_doc("Purchase Order", po)
po_obj = frappe.get_lazy_doc("Purchase Order", po)
if po_obj.status in ["Closed", "Cancelled"]:
frappe.throw(