mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: v13 migration fails due to missing reload_doc (#27192)
closes #25948
This commit is contained in:
@@ -3,10 +3,14 @@ import frappe
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
company = frappe.get_all('Company', filters = {'country': 'India'})
|
company = frappe.get_all('Company', filters = {'country': 'India'})
|
||||||
if not company or not frappe.db.count('E Invoice User'):
|
|
||||||
|
if not company:
|
||||||
return
|
return
|
||||||
|
|
||||||
frappe.reload_doc("regional", "doctype", "e_invoice_user")
|
frappe.reload_doc("regional", "doctype", "e_invoice_user")
|
||||||
|
if not frappe.db.count('E Invoice User'):
|
||||||
|
return
|
||||||
|
|
||||||
for creds in frappe.db.get_all('E Invoice User', fields=['name', 'gstin']):
|
for creds in frappe.db.get_all('E Invoice User', fields=['name', 'gstin']):
|
||||||
company_name = frappe.db.sql("""
|
company_name = frappe.db.sql("""
|
||||||
select dl.link_name from `tabAddress` a, `tabDynamic Link` dl
|
select dl.link_name from `tabAddress` a, `tabDynamic Link` dl
|
||||||
|
|||||||
Reference in New Issue
Block a user