From 6a43f6718a9a1677aee417197fd8c33d7df6653f Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Sun, 28 Jul 2019 10:30:32 +0530 Subject: [PATCH] fix: Reload doc in patch --- .../v12_0/create_accounting_dimensions_in_missing_doctypes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py b/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py index 1796c53c14..b71ea66594 100644 --- a/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py +++ b/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py @@ -3,6 +3,9 @@ import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_field def execute(): + + frappe.reload_doc('accounts', 'doctype', 'accounting_dimension') + accounting_dimensions = frappe.db.sql("""select fieldname, label, document_type, disabled from `tabAccounting Dimension`""", as_dict=1)