refactor(supplier_quotation): Replace SQL by the orm (#55155)

This commit is contained in:
Loic Oberle
2026-05-22 12:40:40 +02:00
committed by GitHub
parent e7c4fb85f8
commit 30ba93fb8f

View File

@@ -347,14 +347,12 @@ def make_quotation(source_name: str, target_doc: str | Document | None = None):
def set_expired_status(): def set_expired_status():
frappe.db.sql( frappe.db.set_value(
""" "Supplier Quotation",
UPDATE filters={"status": ["not in", ["Cancelled", "Stopped"]], "valid_till": ["<", nowdate()]},
`tabSupplier Quotation` SET `status` = 'Expired' fieldname="status",
WHERE value="Expired",
`status` not in ('Cancelled', 'Stopped') AND `valid_till` < %s update_modified=True,
""",
(nowdate()),
) )