fix: List view button for dimensions
This commit is contained in:
parent
4541605e27
commit
ff717a7c16
@ -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))
|
||||
|
||||
|
@ -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"])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user