perf: use cached selling settings (#47949)

* perf: Use cached stock repost settings

* perf: Use cached selling settings
This commit is contained in:
Ankush Menat
2025-06-06 19:40:12 +05:30
committed by GitHub
parent 7d88d9dd4d
commit 73746e2c71
17 changed files with 35 additions and 41 deletions

View File

@@ -255,9 +255,7 @@ class SellingController(StockController):
title=_("Invalid Selling Price"),
)
if self.get("is_return") or not frappe.db.get_single_value(
"Selling Settings", "validate_selling_price"
):
if self.get("is_return") or not frappe.get_settings("Selling Settings", "validate_selling_price"):
return
is_internal_customer = self.get("is_internal_customer")
@@ -717,7 +715,7 @@ class SellingController(StockController):
def validate_for_duplicate_items(self):
check_list, chk_dupl_itm = [], []
if cint(frappe.db.get_single_value("Selling Settings", "allow_multiple_items")):
if cint(frappe.get_settings("Selling Settings", "allow_multiple_items")):
return
if self.doctype == "Sales Invoice" and self.is_consolidated:
return