blob: 640a79e249fbcf758bf901d7ae7ac91158d22595 [file] [log] [blame]
Anand Doshi885e0742015-03-03 14:55:30 +05301// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
Rushabh Mehtae67d1fb2013-08-05 14:59:54 +05302// License: GNU General Public License v3. See license.txt
3
Rushabh Mehta793ba6b2014-02-14 15:47:51 +05304frappe.provide('erpnext');
Rushabh Mehta8c309be2012-01-20 13:47:16 +05305
Rushabh Mehtaa9209432012-05-07 18:00:57 +05306// add toolbar icon
Rushabh Mehta8c309be2012-01-20 13:47:16 +05307$(document).bind('toolbar_setup', function() {
Rushabh Mehta793ba6b2014-02-14 15:47:51 +05308 frappe.app.name = "ERPNext";
Rushabh Mehta8a40c132014-04-15 16:30:55 +05309
Anand Doshi5e849ae2015-07-13 16:56:37 +053010 frappe.help_feedback_link = '<p><a class="text-muted" \
11 href="https://discuss.erpnext.com">Feedback</a></p>'
12
13
Rushabh Mehta147acfd2015-08-05 14:49:32 +053014 $('.navbar-home').html('<img class="erpnext-icon" src="'+
15 frappe.urllib.get_base_url()+'/assets/erpnext/images/erp-icon.svg" />');
Rushabh Mehtae8dd4162014-08-22 15:21:27 +053016
Anand Doshi8f9e6312015-02-26 20:27:41 +053017 $('[data-link="docs"]').attr("href", "https://manual.erpnext.com")
Anand Doshi859cb722012-04-10 11:35:19 +053018});
Rushabh Mehta4c36d732015-01-01 15:59:34 +053019
20// doctypes created via tree
Rushabh Mehtaf5f0d5a2015-03-09 15:47:15 +053021$.extend(frappe.create_routes, {
22 "Customer Group": "Sales Browser/Customer Group",
23 "Territory": "Sales Browser/Territory",
24 "Item Group": "Sales Browser/Item Group",
25 "Sales Person": "Sales Browser/Sales Person",
26 "Account": "Accounts Browser/Account",
27 "Cost Center": "Accounts Browser/Cost Center"
28});
29
30// preferred modules for breadcrumbs
31$.extend(frappe.breadcrumbs.preferred, {
32 "Item Group": "Stock",
33 "Customer Group": "Selling",
34 "Supplier Type": "Buying",
35 "Territory": "Selling",
36 "Sales Person": "Selling",
37 "Sales Partner": "Selling",
38 "Brand": "Selling"
39});
Rushabh Mehta7f75dbf2015-09-24 17:58:34 +053040
41frappe.desk_home_buttons.push({label:"<i class='icon-facetime-video'></i> "+ __("Learn"),
42 route:"Module/Learn"})
43
44frappe.desk_home_flows.push({
45 title: __("Selling"),
46 sequence: [
47 {title: __("Opportunity"), route:"List/Opportunity"},
48 {title: __("Quotation"), route:"List/Quotation"},
49 {title: __("Sales Order"), route:"List/Sales Order"},
50 {title: __("Delivery Note"), route:"List/Delivery Note"},
51 {title: __("Sales Invoice"), route:"List/Sales Invoice"},
52 {title: __("Payment"), route:"List/Journal Entry"},
53 ]
54 });
55
56frappe.desk_home_flows.push({
57 title: __("Buying"),
58 sequence: [
59 {title: __("Material Request"), route:"List/Material Request"},
60 {title: __("Supplier Quotation"), route:"List/Supplier Quotation"},
61 {title: __("Purchase Order"), route:"List/Purchase Order"},
62 {title: __("Purchase Receipt"), route:"List/Purchase Receipt"},
63 {title: __("Purchase Invoice"), route:"List/Purchase Invoice"},
64 {title: __("Payment"), route:"List/Journal Entry"},
65 ]
66 });
67
68frappe.desk_home_flows.push({
69 title: __("Manufacturing"),
70 sequence: [
71 {title: __("BOM"), route:"List/BOM"},
72 {title: __("Production Planning Tool"), route:"Form/Production Planning Tool"},
73 {title: __("Production Order"), route:"List/Production Order"},
74 {title: __("Stock Entry"), route:"List/Stock Entry"},
75 ]
76 });