mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 13:09:17 +00:00
feat: rename old qr fields
This commit is contained in:
16
erpnext/patches/v13_0/rename_ksa_qr_field.py
Normal file
16
erpnext/patches/v13_0/rename_ksa_qr_field.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# 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'):
|
||||||
|
frappe.reload_doc('accounts', 'doctype', 'sales_invoice', force=True)
|
||||||
|
if frappe.db.has_column('Sales Invoice', 'qr_code'):
|
||||||
|
rename_field('Sales Invoice', 'qr_code', 'ksa_einv_qr')
|
||||||
Reference in New Issue
Block a user