[fix] BOM tree as default view
This commit is contained in:
parent
cfb81205b3
commit
621247807a
@ -15,8 +15,8 @@ frappe.treeview_settings["Account"] = {
|
|||||||
menu_items:[
|
menu_items:[
|
||||||
{
|
{
|
||||||
label: __('New Company'),
|
label: __('New Company'),
|
||||||
action: function() { newdoc('Company'); },
|
action: function() { frappe.new_doc("Company", true) },
|
||||||
condition: 'frappe.boot.user.can_create.indexOf("Company") === -1'
|
condition: 'frappe.boot.user.can_create.indexOf("Company") !== -1'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
fields: [
|
fields: [
|
||||||
|
@ -14,8 +14,8 @@ frappe.treeview_settings["Cost Center"] = {
|
|||||||
menu_items:[
|
menu_items:[
|
||||||
{
|
{
|
||||||
label: __('New Company'),
|
label: __('New Company'),
|
||||||
action: function() { newdoc('Company'); },
|
action: function() { frappe.new_doc("Company", true) },
|
||||||
condition: 'frappe.boot.user.can_create.indexOf("Company") === -1'
|
condition: 'frappe.boot.user.can_create.indexOf("Company") !== -1'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
fields:[
|
fields:[
|
||||||
|
@ -33,7 +33,7 @@ on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
|
|||||||
on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
|
on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
|
||||||
|
|
||||||
remember_selected = ['Company', 'Cost Center', 'Project']
|
remember_selected = ['Company', 'Cost Center', 'Project']
|
||||||
treeviews = ['Account', 'Cost Center', 'Warehouse', 'Item Group', 'Customer Group', 'Sales Person', 'Territory']
|
treeviews = ['Account', 'Cost Center', 'Warehouse', 'Item Group', 'Customer Group', 'Sales Person', 'Territory', "BOM"]
|
||||||
|
|
||||||
# website
|
# website
|
||||||
update_website_context = "erpnext.shopping_cart.utils.update_website_context"
|
update_website_context = "erpnext.shopping_cart.utils.update_website_context"
|
||||||
|
@ -24,6 +24,9 @@ frappe.ui.form.on("BOM", {
|
|||||||
frm.events.update_cost(frm);
|
frm.events.update_cost(frm);
|
||||||
});
|
});
|
||||||
frm.add_custom_button(__("Browse BOM"), function() {
|
frm.add_custom_button(__("Browse BOM"), function() {
|
||||||
|
frappe.route_options = {
|
||||||
|
"bom": frm.doc.name
|
||||||
|
};
|
||||||
frappe.set_route("Tree", "BOM");
|
frappe.set_route("Tree", "BOM");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -32,4 +32,13 @@ frappe.treeview_settings["BOM"] = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
menu_items: [
|
||||||
|
{
|
||||||
|
label: __("New BOM"),
|
||||||
|
action: function() {
|
||||||
|
frappe.new_doc("BOM", true)
|
||||||
|
},
|
||||||
|
condition: 'frappe.boot.user.can_create.indexOf("BOM") !== -1'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user