fix: rename KSA QR field to match localisation

This commit is contained in:
Dany Robert 2021-12-07 14:51:05 +05:30 committed by GitHub
parent d06c4b50cd
commit 848b641d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
from frappe.model.utils.rename_field import rename_field
def execute():
company = frappe.get_all('Company', filters = {'country': 'Saudi Arabia'})
if not company:
return
if frappe.db.exists('DocType', 'Sales Invoice') and frappe.get_meta('Sales Invoice').has_field('qr_code'):
rename_field('Sales Invoice', 'qr_code', 'ksa_einv_qr')