Anand Doshi | 885e074 | 2015-03-03 14:55:30 +0530 | [diff] [blame] | 1 | // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors |
Rushabh Mehta | e67d1fb | 2013-08-05 14:59:54 +0530 | [diff] [blame] | 2 | // License: GNU General Public License v3. See license.txt |
| 3 | |
Rushabh Mehta | 793ba6b | 2014-02-14 15:47:51 +0530 | [diff] [blame] | 4 | frappe.provide('erpnext'); |
Rushabh Mehta | 8c309be | 2012-01-20 13:47:16 +0530 | [diff] [blame] | 5 | |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 6 | // add toolbar icon |
Rushabh Mehta | 8c309be | 2012-01-20 13:47:16 +0530 | [diff] [blame] | 7 | $(document).bind('toolbar_setup', function() { |
Rushabh Mehta | 793ba6b | 2014-02-14 15:47:51 +0530 | [diff] [blame] | 8 | frappe.app.name = "ERPNext"; |
Rushabh Mehta | 8a40c13 | 2014-04-15 16:30:55 +0530 | [diff] [blame] | 9 | |
Anand Doshi | 5e849ae | 2015-07-13 16:56:37 +0530 | [diff] [blame] | 10 | frappe.help_feedback_link = '<p><a class="text-muted" \ |
| 11 | href="https://discuss.erpnext.com">Feedback</a></p>' |
| 12 | |
| 13 | |
Rushabh Mehta | 147acfd | 2015-08-05 14:49:32 +0530 | [diff] [blame] | 14 | $('.navbar-home').html('<img class="erpnext-icon" src="'+ |
| 15 | frappe.urllib.get_base_url()+'/assets/erpnext/images/erp-icon.svg" />'); |
Rushabh Mehta | e8dd416 | 2014-08-22 15:21:27 +0530 | [diff] [blame] | 16 | |
Anand Doshi | 8f9e631 | 2015-02-26 20:27:41 +0530 | [diff] [blame] | 17 | $('[data-link="docs"]').attr("href", "https://manual.erpnext.com") |
Anand Doshi | 859cb72 | 2012-04-10 11:35:19 +0530 | [diff] [blame] | 18 | }); |
Rushabh Mehta | 4c36d73 | 2015-01-01 15:59:34 +0530 | [diff] [blame] | 19 | |
| 20 | // doctypes created via tree |
Rushabh Mehta | f5f0d5a | 2015-03-09 15:47:15 +0530 | [diff] [blame] | 21 | $.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 Mehta | 7f75dbf | 2015-09-24 17:58:34 +0530 | [diff] [blame^] | 40 | |
| 41 | frappe.desk_home_buttons.push({label:"<i class='icon-facetime-video'></i> "+ __("Learn"), |
| 42 | route:"Module/Learn"}) |
| 43 | |
| 44 | frappe.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 | |
| 56 | frappe.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 | |
| 68 | frappe.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 | }); |