fix: List view button for dimensions

This commit is contained in:
deepeshgarg007 2019-05-20 18:35:38 +05:30
parent 4541605e27
commit ff717a7c16
2 changed files with 7 additions and 7 deletions

View File

@ -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))

View File

@ -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"])