diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js index f928b0a239..34d17ec92a 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js @@ -3,7 +3,13 @@ frappe.ui.form.on('Accounting Dimension', { - document_type: function(frm){ + refresh: function(frm) { + frm.add_custom_button(__('Show {0} List', [frm.doc.document_type]), function () { + frappe.set_route("List", frm.doc.document_type); + }); + }, + + document_type: function(frm) { frm.set_value('label', frm.doc.document_type); frm.set_value('fieldname', frappe.scrub(frm.doc.document_type)) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index 92b845e661..565d2439da 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -58,11 +58,6 @@ def make_dimension_in_accounting_doctypes(doc): if property_setter: property_setter_doc = frappe.get_doc("Property Setter", "Budget-budget_against-options") - property_setter_doc.doc_type = 'Budget' - property_setter_doc.doctype_or_field = "DocField" - property_setter_doc.fiel_dname = "budget_against" - property_setter_doc.property = "options" - property_setter_doc.property_type = "Text" property_setter_doc.value = property_setter_doc.value + "\n" + doc.document_type property_setter_doc.save() @@ -132,7 +127,6 @@ def get_doclist(): return doclist - def get_accounting_dimensions(): accounting_dimensions = frappe.get_all("Accounting Dimension", fields=["fieldname"])