perf: use cached stock settings (#47945)

This commit is contained in:
Ankush Menat
2025-06-06 18:54:49 +05:30
committed by GitHub
parent 522b6ad49f
commit ea5c2c454b
20 changed files with 56 additions and 72 deletions

View File

@@ -75,7 +75,7 @@ class BuyingController(SubcontractingController):
if self.docstatus == 1 and self.doctype in ["Purchase Receipt", "Purchase Invoice"]:
self.set_onload(
"allow_to_make_qc_after_submission",
frappe.db.get_single_value(
frappe.get_settings(
"Stock Settings", "allow_to_make_quality_inspection_after_purchase_or_delivery"
),
)
@@ -545,7 +545,7 @@ class BuyingController(SubcontractingController):
item.bom = None
def set_qty_as_per_stock_uom(self):
allow_to_edit_stock_qty = frappe.db.get_single_value(
allow_to_edit_stock_qty = frappe.get_settings(
"Stock Settings", "allow_to_edit_stock_uom_qty_for_purchase"
)