From 5b20746311f97bd3872d7314c10108634f76d90d Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Wed, 8 Dec 2021 07:53:45 +0530 Subject: [PATCH] chore: switch to ORM method --- erpnext/patches/v13_0/disable_ksa_print_format_for_others.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v13_0/disable_ksa_print_format_for_others.py b/erpnext/patches/v13_0/disable_ksa_print_format_for_others.py index 4e0c8ec4f1..c815b3bb3c 100644 --- a/erpnext/patches/v13_0/disable_ksa_print_format_for_others.py +++ b/erpnext/patches/v13_0/disable_ksa_print_format_for_others.py @@ -12,6 +12,5 @@ def execute(): if frappe.db.exists('DocType', 'Print Format'): frappe.reload_doc("regional", "print_format", "ksa_vat_invoice", force=True) frappe.reload_doc("regional", "print_format", "ksa_pos_invoice", force=True) - frappe.db.sql("""UPDATE`tabPrint Format` SET disabled = 1 - WHERE name IN ('KSA VAT Invoice', 'KSA POS Invoice') - """) + for d in ('KSA VAT Invoice', 'KSA POS Invoice'): + frappe.db.set_value("Print Format", d, "disabled", 1)