Add Column in tree view

Hi everyone,
I am trying to add another column or at the very least edit the existing warehouse tree column that states the balance in currency form. what I would like to do is change it to show Quantity and custom field Capacity.

What I tried to do is to edit the wawrehouse_tree.js

"> frappe.treeview_settings[‘Warehouse’] = {

	get_tree_nodes: "erpnext.stock.doctype.warehouse.warehouse.get_children",
	add_tree_node: "erpnext.stock.doctype.warehouse.warehouse.add_node",
	get_tree_root: false,
	root_label: "Warehouses",
	filters: [{
		fieldname: "company",
		options: erpnext.utils.get_tree_options("company"),
		label: __("Company"),
		default: erpnext.utils.get_tree_default("company")
		{fieldtype:'Data', fieldname: 'warehouse_name',
			label:__('New Warehouse Name'), reqd:true},
		{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
			description: __("Child nodes can be only created under 'Group' type nodes")}
	onrender: function(node) {
		if ( &&!==undefined) {
			$('<span class="balance-area pull-right text-muted small">'
			+ " " +
			+ '</span>').insertBefore(node.$ul);


Thanks everyone.

1 Like