diff --git a/erpnext/public/build.json b/erpnext/public/build.json index 340ebdb5e5..6e746d7c02 100644 --- a/erpnext/public/build.json +++ b/erpnext/public/build.json @@ -32,5 +32,6 @@ "stock/dashboard/item_dashboard.html", "stock/dashboard/item_dashboard_list.html", "stock/dashboard/item_dashboard.js" + "public/js/module_flow.js" ] } diff --git a/erpnext/public/js/module_flow.js b/erpnext/public/js/module_flow.js new file mode 100644 index 0000000000..3c07b598e7 --- /dev/null +++ b/erpnext/public/js/module_flow.js @@ -0,0 +1,28 @@ +// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +// MIT License. See license.txt + +// for module flow + + +frappe.module_flow = { + "Selling": { + "Sales Order": ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "Journal Entry"], + "Quotation": ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "Journal Entry"] + }, + "Accounts": { + "Sales Invoice": ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "Journal Entry"], + "Purchase Invoice": ["Supplier Quotation", "Purchase Order", "Purchase Receipt", + "Purchase Invoice", "Journal Entry"] + }, + "Buying": { + "Purchase Order": ["Supplier Quotation", "Purchase Order", "Purchase Receipt", + "Purchase Invoice", "Journal Entry"], + "Supplier Quotation": ["Supplier Quotation", "Purchase Order", "Purchase Receipt", + "Purchase Invoice", "Journal Entry"] + }, + "Stock": { + "Delivery Note": ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "Journal Entry"], + "Purchase Receipt": ["Supplier Quotation", "Purchase Order", "Purchase Receipt", + "Purchase Invoice", "Journal Entry"] + } +} \ No newline at end of file diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py index 8ec5bfad0c..7bdcb0aa9c 100644 --- a/erpnext/startup/boot.py +++ b/erpnext/startup/boot.py @@ -32,30 +32,6 @@ def boot_session(bootinfo): bootinfo.docs += frappe.db.sql("""select name, default_currency, cost_center, default_terms, default_letter_head, default_bank_account from `tabCompany`""", as_dict=1, update={"doctype":":Company"}) - - bootinfo.module_flow = { - "Selling": { - "Sales Order": ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "Journal Entry"], - "Quotation": ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "Journal Entry"] - }, - "Accounts": { - "Sales Invoice": ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "Journal Entry"], - "Purchase Invoice": ["Supplier Quotation", "Purchase Order", "Purchase Receipt", - "Purchase Invoice", "Journal Entry"] - }, - "Buying": { - "Purchase Order": ["Supplier Quotation", "Purchase Order", "Purchase Receipt", - "Purchase Invoice", "Journal Entry"], - "Supplier Quotation": ["Supplier Quotation", "Purchase Order", "Purchase Receipt", - "Purchase Invoice", "Journal Entry"] - }, - "Stock": { - "Delivery Note": ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "Journal Entry"], - "Purchase Receipt": ["Supplier Quotation", "Purchase Order", "Purchase Receipt", - "Purchase Invoice", "Journal Entry"] - } - } - def load_country_and_currency(bootinfo): country = frappe.db.get_default("country")