feat(Regional): patch to disable ksa print formats for other countries

This commit is contained in:
Dany Robert 2021-12-07 11:02:28 +00:00
parent 09f178ceee
commit 2256155e80

View File

@ -0,0 +1,14 @@
# Copyright (c) 2020, Wahni Green Technologies and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
def execute():
company = frappe.get_all('Company', filters = {'country': 'Saudi Arabia'})
if company:
return
if frappe.db.exists('DocType', 'Print Format'):
frappe.db.sql("""UPDATE`tabPrint Format` SET disabled = 1 WHERE
name IN ('KSA VAT Invoice', 'KSA POS Invoice')""")