From 75458f90b5f562cec0bcf8fb6bb87f73f7684a67 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 (cherry picked from commit 972d06555aea8a8e4aec3186f3844b942fa54d38) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 26 ++++++++++++++++++++ erpnext/patches/v13_0/enable_ksa_vat_docs.py | 12 +++++++++ 2 files changed, 38 insertions(+) create mode 100644 erpnext/patches/v13_0/enable_ksa_vat_docs.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index ccafb6bb564..c0006cfdb7a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -340,6 +340,32 @@ erpnext.patches.v13_0.rename_ksa_qr_field erpnext.patches.v13_0.wipe_serial_no_field_for_0_qty erpnext.patches.v13_0.disable_ksa_print_format_for_others # 16-12-2021 erpnext.patches.v13_0.update_tax_category_for_rcm +<<<<<<< HEAD +======= +execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings') +erpnext.patches.v14_0.set_payroll_cost_centers +erpnext.patches.v13_0.agriculture_deprecation_warning +erpnext.patches.v13_0.hospitality_deprecation_warning +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 +erpnext.patches.v14_0.add_default_exit_questionnaire_notification_template +erpnext.patches.v14_0.delete_shopify_doctypes +erpnext.patches.v14_0.delete_hub_doctypes +erpnext.patches.v14_0.delete_hospitality_doctypes # 20-01-2022 +erpnext.patches.v14_0.delete_agriculture_doctypes +erpnext.patches.v14_0.rearrange_company_fields +erpnext.patches.v14_0.update_leave_notification_template +erpnext.patches.v14_0.restore_einvoice_fields +erpnext.patches.v13_0.update_sane_transfer_against +erpnext.patches.v12_0.add_company_link_to_einvoice_settings +erpnext.patches.v14_0.migrate_cost_center_allocations +>>>>>>> 972d06555a (fix: Add permission for KSA Vat documents) erpnext.patches.v13_0.convert_to_website_item_in_item_card_group_template erpnext.patches.v13_0.agriculture_deprecation_warning erpnext.patches.v13_0.update_maintenance_schedule_field_in_visit 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