fix: lock timeout exceeded
diff --git a/erpnext/patches/v14_0/discount_accounting_separation.py b/erpnext/patches/v14_0/discount_accounting_separation.py
index e7e4a2e..3d4907c 100644
--- a/erpnext/patches/v14_0/discount_accounting_separation.py
+++ b/erpnext/patches/v14_0/discount_accounting_separation.py
@@ -4,11 +4,5 @@
     doc = frappe.get_doc("Accounts Settings")
     discount_account = doc.enable_discount_accounting
     if discount_account:
-        buying_settings = frappe.get_doc("Buying Settings", "Buying Settings")
-        selling_settings = frappe.get_doc("Selling Settings", "Selling Settings")
-
-        buying_settings.enable_discount_accounting = 1
-        selling_settings.enable_discount_accounting = 1
-
-        buying_settings.save()
-        selling_settings.save()
\ No newline at end of file
+        for doctype in ["Buying Settings", "Selling Settings"]:
+            doc = frappe.db.set_value(doctype, doctype, 'enable_discount_accounting', 1, update_modified=False)
\ No newline at end of file