Anand Doshi | d57e793 | 2015-02-24 12:24:53 +0530 | [diff] [blame] | 1 | from __future__ import unicode_literals |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 2 | from frappe import _ |
Anand Doshi | 227b238 | 2016-06-09 16:29:12 +0530 | [diff] [blame] | 3 | from . import __version__ as app_version |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 4 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 5 | app_name = "erpnext" |
| 6 | app_title = "ERPNext" |
Rushabh Mehta | ba02ce6 | 2015-07-22 15:07:25 +0530 | [diff] [blame] | 7 | app_publisher = "Frappe Technologies Pvt. Ltd." |
Rushabh Mehta | edc8ab0 | 2015-11-18 16:48:19 +0530 | [diff] [blame] | 8 | app_description = """ERP made simple""" |
Rushabh Mehta | 2167ff5 | 2016-12-07 11:08:48 +0530 | [diff] [blame] | 9 | app_icon = "fa fa-th" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 10 | app_color = "#e74c3c" |
Nabin Hait | 7ba4d02 | 2015-11-05 16:55:10 +0530 | [diff] [blame] | 11 | app_email = "info@erpnext.com" |
| 12 | app_license = "GNU General Public License (v3)" |
Rushabh Mehta | 7d23e42 | 2015-11-02 10:45:18 +0530 | [diff] [blame] | 13 | source_link = "https://github.com/frappe/erpnext" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 14 | |
Faris Ansari | 1c09a99 | 2017-05-04 12:12:14 +0530 | [diff] [blame] | 15 | develop_version = '8.x.x-beta' |
Rushabh Mehta | db206f2 | 2017-03-10 09:38:58 +0530 | [diff] [blame] | 16 | |
Anand Doshi | 0c3bb75 | 2014-07-09 12:59:56 +0530 | [diff] [blame] | 17 | error_report_email = "support@erpnext.com" |
| 18 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 19 | app_include_js = "assets/js/erpnext.min.js" |
| 20 | app_include_css = "assets/css/erpnext.css" |
| 21 | web_include_js = "assets/js/erpnext-web.min.js" |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 22 | web_include_css = "assets/erpnext/css/website.css" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 23 | |
mbauskar | f54b104 | 2017-03-13 16:32:46 +0530 | [diff] [blame] | 24 | doctype_js = { |
| 25 | "Communication": "public/js/communication.js", |
| 26 | } |
| 27 | |
Rushabh Mehta | 37b4d75 | 2015-11-09 16:53:11 +0530 | [diff] [blame] | 28 | # setup wizard |
| 29 | setup_wizard_requires = "assets/erpnext/js/setup_wizard.js" |
| 30 | setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_complete" |
| 31 | |
Rushabh Mehta | d55bdcf | 2015-12-31 11:12:48 +0530 | [diff] [blame] | 32 | before_install = "erpnext.setup.install.check_setup_wizard_not_completed" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 33 | after_install = "erpnext.setup.install.after_install" |
| 34 | |
| 35 | boot_session = "erpnext.startup.boot.boot_session" |
| 36 | notification_config = "erpnext.startup.notifications.get_notification_config" |
Rushabh Mehta | 05ce7ec | 2017-02-22 16:15:43 +0530 | [diff] [blame] | 37 | get_help_messages = "erpnext.utilities.activation.get_help_messages" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 38 | |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 39 | on_session_creation = "erpnext.shopping_cart.utils.set_cart_count" |
| 40 | on_logout = "erpnext.shopping_cart.utils.clear_cart_count" |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 41 | |
Saurabh | 6212478 | 2016-06-30 13:33:49 +0530 | [diff] [blame] | 42 | treeviews = ['Account', 'Cost Center', 'Warehouse', 'Item Group', 'Customer Group', 'Sales Person', 'Territory', "BOM"] |
Rushabh Mehta | 764aa92 | 2016-05-02 13:28:46 +0530 | [diff] [blame] | 43 | |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 44 | # website |
| 45 | update_website_context = "erpnext.shopping_cart.utils.update_website_context" |
| 46 | my_account_context = "erpnext.shopping_cart.utils.update_my_account_context" |
Rushabh Mehta | 621d6ea | 2015-07-08 12:39:27 +0530 | [diff] [blame] | 47 | |
Rushabh Mehta | 4c46687 | 2015-04-02 22:00:34 +0530 | [diff] [blame] | 48 | email_append_to = ["Job Applicant", "Opportunity", "Issue"] |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 49 | |
Rohit Waghchaure | d6c986d | 2016-06-03 14:44:35 +0530 | [diff] [blame] | 50 | calendars = ["Task", "Production Order", "Leave Application", "Sales Order", "Holiday List"] |
Rushabh Mehta | 621d6ea | 2015-07-08 12:39:27 +0530 | [diff] [blame] | 51 | |
Kanchan Chauhan | 1f3d5b7 | 2016-03-01 11:33:49 +0530 | [diff] [blame] | 52 | fixtures = ["Web Form"] |
| 53 | |
pratu16x7 | aad8257 | 2017-02-09 08:57:33 +0530 | [diff] [blame] | 54 | website_generators = ["Item Group", "Item", "BOM", "Sales Partner", "Job Opening", "Student Admission"] |
Rushabh Mehta | 621d6ea | 2015-07-08 12:39:27 +0530 | [diff] [blame] | 55 | |
Rushabh Mehta | 2e7c36e | 2015-04-16 12:41:42 +0530 | [diff] [blame] | 56 | website_context = { |
Rushabh Mehta | 5674c4f | 2015-04-16 15:09:42 +0530 | [diff] [blame] | 57 | "favicon": "/assets/erpnext/images/favicon.png", |
Rushabh Mehta | d40e661 | 2017-01-10 14:46:45 +0530 | [diff] [blame] | 58 | "splash_image": "/assets/erpnext/images/erp-icon.svg" |
Rushabh Mehta | 2e7c36e | 2015-04-16 12:41:42 +0530 | [diff] [blame] | 59 | } |
| 60 | |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 61 | website_route_rules = [ |
| 62 | {"from_route": "/orders", "to_route": "Sales Order"}, |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 63 | {"from_route": "/orders/<path:name>", "to_route": "order", |
| 64 | "defaults": { |
| 65 | "doctype": "Sales Order", |
| 66 | "parents": [{"title": _("Orders"), "name": "orders"}] |
| 67 | } |
| 68 | }, |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 69 | {"from_route": "/invoices", "to_route": "Sales Invoice"}, |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 70 | {"from_route": "/invoices/<path:name>", "to_route": "order", |
| 71 | "defaults": { |
| 72 | "doctype": "Sales Invoice", |
| 73 | "parents": [{"title": _("Invoices"), "name": "invoices"}] |
| 74 | } |
| 75 | }, |
Rohit Waghchaure | 21499e8 | 2016-09-21 16:49:58 +0530 | [diff] [blame] | 76 | {"from_route": "/quotations", "to_route": "Supplier Quotation"}, |
| 77 | {"from_route": "/quotations/<path:name>", "to_route": "order", |
| 78 | "defaults": { |
| 79 | "doctype": "Supplier Quotation", |
| 80 | "parents": [{"title": _("Supplier Quotation"), "name": "quotations"}] |
| 81 | } |
| 82 | }, |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 83 | {"from_route": "/shipments", "to_route": "Delivery Note"}, |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 84 | {"from_route": "/shipments/<path:name>", "to_route": "order", |
| 85 | "defaults": { |
Anand Doshi | 4b12740 | 2015-11-26 18:22:03 +0530 | [diff] [blame] | 86 | "doctype": "Delivery Note", |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 87 | "parents": [{"title": _("Shipments"), "name": "shipments"}] |
| 88 | } |
Kanchan Chauhan | 2e8cc89 | 2016-02-19 17:27:23 +0530 | [diff] [blame] | 89 | }, |
rohitwaghchaure | a1064a6 | 2016-03-03 14:00:35 +0530 | [diff] [blame] | 90 | {"from_route": "/rfq", "to_route": "Request for Quotation"}, |
| 91 | {"from_route": "/rfq/<path:name>", "to_route": "rfq", |
| 92 | "defaults": { |
| 93 | "doctype": "Request for Quotation", |
| 94 | "parents": [{"title": _("Request for Quotation"), "name": "rfq"}] |
| 95 | } |
| 96 | }, |
Kanchan Chauhan | 1605ff0 | 2016-07-04 14:28:09 +0530 | [diff] [blame] | 97 | {"from_route": "/addresses", "to_route": "Address"}, |
| 98 | {"from_route": "/addresses/<path:name>", "to_route": "addresses", |
| 99 | "defaults": { |
| 100 | "doctype": "Address", |
| 101 | "parents": [{"title": _("Addresses"), "name": "addresses"}] |
| 102 | } |
| 103 | }, |
Kanchan Chauhan | 2e8cc89 | 2016-02-19 17:27:23 +0530 | [diff] [blame] | 104 | {"from_route": "/jobs", "to_route": "Job Opening"}, |
Neil Trini Lasrado | 83d8120 | 2016-09-15 14:48:13 +0530 | [diff] [blame] | 105 | {"from_route": "/admissions", "to_route": "Student Admission"}, |
pratu16x7 | dee36e1 | 2017-02-10 18:28:39 +0530 | [diff] [blame] | 106 | {"from_route": "/boms", "to_route": "BOM"} |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 107 | ] |
| 108 | |
Rushabh Mehta | b9cdb05 | 2017-03-08 12:33:43 +0530 | [diff] [blame] | 109 | standard_portal_menu_items = [ |
Rushabh Mehta | 0c76f21 | 2016-04-01 11:53:50 +0530 | [diff] [blame] | 110 | {"title": _("Projects"), "route": "/project", "reference_doctype": "Project"}, |
Rushabh Mehta | fc800b3 | 2016-09-23 21:51:51 +0530 | [diff] [blame] | 111 | {"title": _("Request for Quotations"), "route": "/rfq", "reference_doctype": "Request for Quotation", "role": "Supplier"}, |
| 112 | {"title": _("Supplier Quotation"), "route": "/quotations", "reference_doctype": "Supplier Quotation", "role": "Supplier"}, |
| 113 | {"title": _("Orders"), "route": "/orders", "reference_doctype": "Sales Order", "role":"Customer"}, |
| 114 | {"title": _("Invoices"), "route": "/invoices", "reference_doctype": "Sales Invoice", "role":"Customer"}, |
| 115 | {"title": _("Shipments"), "route": "/shipments", "reference_doctype": "Delivery Note", "role":"Customer"}, |
| 116 | {"title": _("Issues"), "route": "/issues", "reference_doctype": "Issue", "role":"Customer"}, |
Neil Trini Lasrado | 3f0a581 | 2016-07-19 14:17:33 +0530 | [diff] [blame] | 117 | {"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"}, |
Rushabh Mehta | fc800b3 | 2016-09-23 21:51:51 +0530 | [diff] [blame] | 118 | {"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees", "role":"Student"} |
| 119 | ] |
| 120 | |
| 121 | default_roles = [ |
Rushabh Mehta | 95439db | 2017-01-14 00:25:22 +0530 | [diff] [blame] | 122 | {'role': 'Customer', 'doctype':'Contact', 'email_field': 'email_id'}, |
| 123 | {'role': 'Supplier', 'doctype':'Contact', 'email_field': 'email_id'}, |
Rushabh Mehta | fc800b3 | 2016-09-23 21:51:51 +0530 | [diff] [blame] | 124 | {'role': 'Student', 'doctype':'Student', 'email_field': 'student_email_id'} |
Rushabh Mehta | c78b311 | 2016-03-30 12:29:48 +0530 | [diff] [blame] | 125 | ] |
| 126 | |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 127 | has_website_permission = { |
| 128 | "Sales Order": "erpnext.controllers.website_list_for_contact.has_website_permission", |
| 129 | "Sales Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission", |
Rohit Waghchaure | 21499e8 | 2016-09-21 16:49:58 +0530 | [diff] [blame] | 130 | "Supplier Quotation": "erpnext.controllers.website_list_for_contact.has_website_permission", |
Rushabh Mehta | a33d468 | 2015-06-01 17:15:42 +0530 | [diff] [blame] | 131 | "Delivery Note": "erpnext.controllers.website_list_for_contact.has_website_permission", |
Rushabh Mehta | 4500f7b | 2017-01-30 17:04:38 +0530 | [diff] [blame] | 132 | "Issue": "erpnext.support.doctype.issue.issue.has_website_permission" |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 133 | } |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 134 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 135 | dump_report_map = "erpnext.startup.report_data_map.data_map" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 136 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 137 | before_tests = "erpnext.setup.utils.before_tests" |
| 138 | |
Rushabh Mehta | 308e6ea | 2015-03-24 17:34:58 +0530 | [diff] [blame] | 139 | standard_queries = { |
| 140 | "Customer": "erpnext.selling.doctype.customer.customer.get_customer_list" |
| 141 | } |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 142 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 143 | doc_events = { |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 144 | "Stock Entry": { |
Nabin Hait | 4acd431 | 2014-11-04 15:32:31 +0530 | [diff] [blame] | 145 | "on_submit": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty", |
| 146 | "on_cancel": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty" |
Anand Doshi | 648062d | 2014-05-05 16:46:14 +0530 | [diff] [blame] | 147 | }, |
| 148 | "User": { |
KanchanChauhan | 1dc26b1 | 2017-06-13 15:26:35 +0530 | [diff] [blame] | 149 | "after_insert": "frappe.contacts.doctype.contact.contact.update_contact", |
Anand Doshi | 4985691 | 2014-05-28 18:49:13 +0530 | [diff] [blame] | 150 | "validate": "erpnext.hr.doctype.employee.employee.validate_employee_role", |
Rushabh Mehta | 0d6db6c | 2017-03-31 23:01:45 +0530 | [diff] [blame] | 151 | "on_update": ["erpnext.hr.doctype.employee.employee.update_user_permissions", |
| 152 | "erpnext.portal.utils.set_default_role"] |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 153 | }, |
Rushabh Mehta | f16f9c5 | 2016-04-08 17:20:50 +0530 | [diff] [blame] | 154 | ("Sales Taxes and Charges Template", 'Price List'): { |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 155 | "on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings" |
| 156 | }, |
Rushabh Mehta | f16f9c5 | 2016-04-08 17:20:50 +0530 | [diff] [blame] | 157 | |
Anand Doshi | e3bd78e | 2016-04-22 18:53:21 +0530 | [diff] [blame] | 158 | "Website Settings": { |
| 159 | "validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products" |
Saurabh | e4e8954 | 2016-07-21 20:26:46 +0530 | [diff] [blame] | 160 | }, |
| 161 | "Payment Entry": { |
| 162 | "on_submit": "erpnext.accounts.doctype.payment_request.payment_request.make_status_as_paid" |
Anand Doshi | e3bd78e | 2016-04-22 18:53:21 +0530 | [diff] [blame] | 163 | } |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | scheduler_events = { |
Nabin Hait | 7580723 | 2015-07-02 14:41:27 +0530 | [diff] [blame] | 167 | "hourly": [ |
Rushabh Mehta | fe816c3 | 2016-11-08 18:18:40 +0530 | [diff] [blame] | 168 | "erpnext.controllers.recurring_document.create_recurring_documents", |
| 169 | 'erpnext.hr.doctype.daily_work_summary_settings.daily_work_summary_settings.trigger_emails' |
Nabin Hait | 7580723 | 2015-07-02 14:41:27 +0530 | [diff] [blame] | 170 | ], |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 171 | "daily": [ |
Rushabh Mehta | f850987 | 2014-10-08 12:03:19 +0530 | [diff] [blame] | 172 | "erpnext.stock.reorder_item.reorder_item", |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 173 | "erpnext.setup.doctype.email_digest.email_digest.send", |
Nabin Hait | 606af96 | 2014-12-15 11:57:03 +0530 | [diff] [blame] | 174 | "erpnext.support.doctype.issue.issue.auto_close_tickets", |
mbauskar | e1e25a0 | 2017-02-16 19:36:59 +0530 | [diff] [blame] | 175 | "erpnext.crm.doctype.opportunity.opportunity.auto_close_opportunity", |
Rohit Waghchaure | 2f1db57 | 2016-11-08 12:39:33 +0530 | [diff] [blame] | 176 | "erpnext.controllers.accounts_controller.update_invoice_status", |
Rushabh Mehta | 5bceebc | 2015-01-23 15:22:13 +0530 | [diff] [blame] | 177 | "erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year", |
Rushabh Mehta | 13ec41a | 2015-12-10 12:31:36 +0530 | [diff] [blame] | 178 | "erpnext.hr.doctype.employee.employee.send_birthday_reminders", |
Nabin Hait | 4fdb052 | 2016-03-09 12:40:56 +0530 | [diff] [blame] | 179 | "erpnext.projects.doctype.task.task.set_tasks_as_overdue", |
Rushabh Mehta | 9dd58d4 | 2016-11-18 12:39:24 +0530 | [diff] [blame] | 180 | "erpnext.accounts.doctype.asset.depreciation.post_depreciation_entries", |
Manas Solanki | 253c53c | 2017-05-30 15:35:58 +0530 | [diff] [blame] | 181 | "erpnext.hr.doctype.daily_work_summary_settings.daily_work_summary_settings.send_summary", |
| 182 | "erpnext.stock.doctype.serial_no.serial_no.update_maintenance_status" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 183 | ] |
| 184 | } |
Anand Doshi | 7f41ff2 | 2014-06-26 12:02:55 +0530 | [diff] [blame] | 185 | |
Anand Doshi | c5f919e | 2015-09-16 19:20:55 +0530 | [diff] [blame] | 186 | default_mail_footer = """<div style="text-align: center;"> |
Nabin Hait | b3a142f | 2015-05-26 12:13:30 +0530 | [diff] [blame] | 187 | <a href="https://erpnext.com?source=via_email_footer" target="_blank" style="color: #8d99a6;"> |
| 188 | Sent via ERPNext |
Anand Doshi | adcf857 | 2015-03-27 17:42:03 +0530 | [diff] [blame] | 189 | </a> |
| 190 | </div>""" |
Anand Doshi | c82331b | 2015-02-12 18:58:28 +0530 | [diff] [blame] | 191 | |
| 192 | get_translated_dict = { |
Anand Doshi | c82331b | 2015-02-12 18:58:28 +0530 | [diff] [blame] | 193 | ("doctype", "Global Defaults"): "frappe.geo.country_info.get_translated_dict" |
| 194 | } |
Rushabh Mehta | fe027b3 | 2016-03-28 13:21:43 +0530 | [diff] [blame] | 195 | |
| 196 | bot_parsers = [ |
| 197 | 'erpnext.utilities.bot.FindItemBot', |
Rushabh Mehta | 0c76f21 | 2016-04-01 11:53:50 +0530 | [diff] [blame] | 198 | ] |
Anand Doshi | f576f3b | 2016-06-25 19:51:48 +0530 | [diff] [blame] | 199 | |
| 200 | get_site_info = 'erpnext.utilities.get_site_info' |
Saurabh | 94c666a | 2016-11-08 20:35:50 +0530 | [diff] [blame] | 201 | |
Saurabh | 0d47d51 | 2017-03-14 14:46:05 +0530 | [diff] [blame] | 202 | payment_gateway_enabled = "erpnext.accounts.utils.create_payment_gateway_account" |