chore: switch to ORM method

This commit is contained in:
Dany Robert 2021-12-08 07:53:45 +05:30 committed by GitHub
parent ca85094728
commit 5b20746311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)