mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
fix: reload SI meta before checking
This commit is contained in:
@@ -10,5 +10,7 @@ def execute():
|
|||||||
if not company:
|
if not company:
|
||||||
return
|
return
|
||||||
|
|
||||||
if frappe.db.exists('DocType', 'Sales Invoice') and frappe.get_meta('Sales Invoice').has_field('qr_code'):
|
if frappe.db.exists('DocType', 'Sales Invoice'):
|
||||||
rename_field('Sales Invoice', 'qr_code', 'ksa_einv_qr')
|
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