From 972d06555aea8a8e4aec3186f3844b942fa54d38 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 18 Mar 2022 17:32:46 +0530 Subject: [PATCH] fix: Add permission for KSA Vat documents --- erpnext/patches.txt | 1 + erpnext/patches/v13_0/enable_ksa_vat_docs.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 erpnext/patches/v13_0/enable_ksa_vat_docs.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 16d8c730a14..31999126214 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -333,6 +333,7 @@ erpnext.patches.v13_0.update_asset_quantity_field erpnext.patches.v13_0.delete_bank_reconciliation_detail erpnext.patches.v13_0.enable_provisional_accounting erpnext.patches.v13_0.non_profit_deprecation_warning +erpnext.patches.v13_0.enable_ksa_vat_docs #1 [post_model_sync] erpnext.patches.v14_0.rename_ongoing_status_in_sla_documents diff --git a/erpnext/patches/v13_0/enable_ksa_vat_docs.py b/erpnext/patches/v13_0/enable_ksa_vat_docs.py new file mode 100644 index 00000000000..3f482620e16 --- /dev/null +++ b/erpnext/patches/v13_0/enable_ksa_vat_docs.py @@ -0,0 +1,12 @@ +import frappe + +from erpnext.regional.saudi_arabia.setup import add_permissions, add_print_formats + + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'Saudi Arabia'}) + if not company: + return + + add_print_formats() + add_permissions() \ No newline at end of file