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 | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 9 | app_icon = "icon-th" |
| 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 | |
Anand Doshi | 0c3bb75 | 2014-07-09 12:59:56 +0530 | [diff] [blame] | 15 | error_report_email = "support@erpnext.com" |
| 16 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 17 | app_include_js = "assets/js/erpnext.min.js" |
| 18 | app_include_css = "assets/css/erpnext.css" |
| 19 | web_include_js = "assets/js/erpnext-web.min.js" |
Anand Doshi | da858cc | 2015-02-24 17:50:44 +0530 | [diff] [blame] | 20 | web_include_css = "assets/erpnext/css/website.css" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 21 | |
Rushabh Mehta | 37b4d75 | 2015-11-09 16:53:11 +0530 | [diff] [blame] | 22 | # setup wizard |
| 23 | setup_wizard_requires = "assets/erpnext/js/setup_wizard.js" |
| 24 | setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_complete" |
| 25 | |
Rushabh Mehta | d55bdcf | 2015-12-31 11:12:48 +0530 | [diff] [blame] | 26 | before_install = "erpnext.setup.install.check_setup_wizard_not_completed" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 27 | after_install = "erpnext.setup.install.after_install" |
| 28 | |
| 29 | boot_session = "erpnext.startup.boot.boot_session" |
| 30 | notification_config = "erpnext.startup.notifications.get_notification_config" |
| 31 | |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 32 | on_session_creation = "erpnext.shopping_cart.utils.set_cart_count" |
| 33 | on_logout = "erpnext.shopping_cart.utils.clear_cart_count" |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 34 | |
Rushabh Mehta | 764aa92 | 2016-05-02 13:28:46 +0530 | [diff] [blame] | 35 | remember_selected = ['Company', 'Cost Center', 'Project'] |
| 36 | |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 37 | # website |
| 38 | update_website_context = "erpnext.shopping_cart.utils.update_website_context" |
| 39 | my_account_context = "erpnext.shopping_cart.utils.update_my_account_context" |
Rushabh Mehta | 621d6ea | 2015-07-08 12:39:27 +0530 | [diff] [blame] | 40 | |
Rushabh Mehta | 4c46687 | 2015-04-02 22:00:34 +0530 | [diff] [blame] | 41 | email_append_to = ["Job Applicant", "Opportunity", "Issue"] |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 42 | |
Saurabh | 1d753c9 | 2015-10-06 15:21:23 +0530 | [diff] [blame] | 43 | calendars = ["Task", "Production Order", "Time Log", "Leave Application", "Sales Order", "Holiday List"] |
Rushabh Mehta | 621d6ea | 2015-07-08 12:39:27 +0530 | [diff] [blame] | 44 | |
Kanchan Chauhan | 1f3d5b7 | 2016-03-01 11:33:49 +0530 | [diff] [blame] | 45 | fixtures = ["Web Form"] |
| 46 | |
Rushabh Mehta | fe6eadf | 2016-03-02 12:53:19 +0530 | [diff] [blame] | 47 | website_generators = ["Item Group", "Item", "Sales Partner", "Job Opening"] |
Rushabh Mehta | 621d6ea | 2015-07-08 12:39:27 +0530 | [diff] [blame] | 48 | |
Rushabh Mehta | 2e7c36e | 2015-04-16 12:41:42 +0530 | [diff] [blame] | 49 | website_context = { |
Rushabh Mehta | 5674c4f | 2015-04-16 15:09:42 +0530 | [diff] [blame] | 50 | "favicon": "/assets/erpnext/images/favicon.png", |
| 51 | "splash_image": "/assets/erpnext/images/splash.png" |
Rushabh Mehta | 2e7c36e | 2015-04-16 12:41:42 +0530 | [diff] [blame] | 52 | } |
| 53 | |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 54 | website_route_rules = [ |
| 55 | {"from_route": "/orders", "to_route": "Sales Order"}, |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 56 | {"from_route": "/orders/<path:name>", "to_route": "order", |
| 57 | "defaults": { |
| 58 | "doctype": "Sales Order", |
| 59 | "parents": [{"title": _("Orders"), "name": "orders"}] |
| 60 | } |
| 61 | }, |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 62 | {"from_route": "/invoices", "to_route": "Sales Invoice"}, |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 63 | {"from_route": "/invoices/<path:name>", "to_route": "order", |
| 64 | "defaults": { |
| 65 | "doctype": "Sales Invoice", |
| 66 | "parents": [{"title": _("Invoices"), "name": "invoices"}] |
| 67 | } |
| 68 | }, |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 69 | {"from_route": "/shipments", "to_route": "Delivery Note"}, |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 70 | {"from_route": "/shipments/<path:name>", "to_route": "order", |
| 71 | "defaults": { |
Anand Doshi | 4b12740 | 2015-11-26 18:22:03 +0530 | [diff] [blame] | 72 | "doctype": "Delivery Note", |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 73 | "parents": [{"title": _("Shipments"), "name": "shipments"}] |
| 74 | } |
Kanchan Chauhan | 2e8cc89 | 2016-02-19 17:27:23 +0530 | [diff] [blame] | 75 | }, |
rohitwaghchaure | a1064a6 | 2016-03-03 14:00:35 +0530 | [diff] [blame] | 76 | {"from_route": "/rfq", "to_route": "Request for Quotation"}, |
| 77 | {"from_route": "/rfq/<path:name>", "to_route": "rfq", |
| 78 | "defaults": { |
| 79 | "doctype": "Request for Quotation", |
| 80 | "parents": [{"title": _("Request for Quotation"), "name": "rfq"}] |
| 81 | } |
| 82 | }, |
Kanchan Chauhan | 2e8cc89 | 2016-02-19 17:27:23 +0530 | [diff] [blame] | 83 | {"from_route": "/jobs", "to_route": "Job Opening"}, |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 84 | ] |
| 85 | |
Rushabh Mehta | c78b311 | 2016-03-30 12:29:48 +0530 | [diff] [blame] | 86 | portal_menu_items = [ |
Rushabh Mehta | 0c76f21 | 2016-04-01 11:53:50 +0530 | [diff] [blame] | 87 | {"title": _("Projects"), "route": "/project", "reference_doctype": "Project"}, |
| 88 | {"title": _("Request for Quotations"), "route": "/rfq", "reference_doctype": "Request for Quotation"}, |
| 89 | {"title": _("Orders"), "route": "/orders", "reference_doctype": "Sales Order"}, |
| 90 | {"title": _("Invoices"), "route": "/invoices", "reference_doctype": "Sales Invoice"}, |
| 91 | {"title": _("Shipments"), "route": "/shipments", "reference_doctype": "Delivery Note"}, |
Rushabh Mehta | e778e59 | 2016-06-08 15:34:54 +0530 | [diff] [blame] | 92 | {"title": _("Issues"), "route": "/issues", "reference_doctype": "Issue", "show_always": True}, |
Rushabh Mehta | 0c76f21 | 2016-04-01 11:53:50 +0530 | [diff] [blame] | 93 | {"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"} |
Rushabh Mehta | c78b311 | 2016-03-30 12:29:48 +0530 | [diff] [blame] | 94 | ] |
| 95 | |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 96 | has_website_permission = { |
| 97 | "Sales Order": "erpnext.controllers.website_list_for_contact.has_website_permission", |
| 98 | "Sales Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission", |
Rushabh Mehta | a33d468 | 2015-06-01 17:15:42 +0530 | [diff] [blame] | 99 | "Delivery Note": "erpnext.controllers.website_list_for_contact.has_website_permission", |
Rushabh Mehta | 834b3e6 | 2015-11-13 14:37:52 +0530 | [diff] [blame] | 100 | "Issue": "erpnext.support.doctype.issue.issue.has_website_permission", |
| 101 | "Address": "erpnext.utilities.doctype.address.address.has_website_permission" |
Anand Doshi | f9fc04c | 2015-02-23 22:14:12 +0530 | [diff] [blame] | 102 | } |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 103 | |
Anand Doshi | 89b8d11 | 2015-09-29 20:06:53 +0530 | [diff] [blame] | 104 | permission_query_conditions = { |
| 105 | "Contact": "erpnext.utilities.address_and_contact.get_permission_query_conditions_for_contact", |
| 106 | "Address": "erpnext.utilities.address_and_contact.get_permission_query_conditions_for_address" |
| 107 | } |
| 108 | |
| 109 | has_permission = { |
| 110 | "Contact": "erpnext.utilities.address_and_contact.has_permission", |
| 111 | "Address": "erpnext.utilities.address_and_contact.has_permission" |
| 112 | } |
| 113 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 114 | dump_report_map = "erpnext.startup.report_data_map.data_map" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 115 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 116 | before_tests = "erpnext.setup.utils.before_tests" |
| 117 | |
Rushabh Mehta | 308e6ea | 2015-03-24 17:34:58 +0530 | [diff] [blame] | 118 | standard_queries = { |
| 119 | "Customer": "erpnext.selling.doctype.customer.customer.get_customer_list" |
| 120 | } |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 121 | |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 122 | doc_events = { |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 123 | "Stock Entry": { |
Nabin Hait | 4acd431 | 2014-11-04 15:32:31 +0530 | [diff] [blame] | 124 | "on_submit": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty", |
| 125 | "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] | 126 | }, |
| 127 | "User": { |
Anand Doshi | 4985691 | 2014-05-28 18:49:13 +0530 | [diff] [blame] | 128 | "validate": "erpnext.hr.doctype.employee.employee.validate_employee_role", |
Rushabh Mehta | 2d985e1 | 2016-03-30 17:15:33 +0530 | [diff] [blame] | 129 | "on_update": "erpnext.hr.doctype.employee.employee.update_user_permissions", |
| 130 | "on_update": "erpnext.utilities.doctype.contact.contact.update_contact" |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 131 | }, |
Rushabh Mehta | f16f9c5 | 2016-04-08 17:20:50 +0530 | [diff] [blame] | 132 | ("Sales Taxes and Charges Template", 'Price List'): { |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 133 | "on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings" |
| 134 | }, |
Anand Doshi | cc24d28 | 2015-12-08 12:34:01 +0530 | [diff] [blame] | 135 | "Address": { |
| 136 | "validate": "erpnext.shopping_cart.cart.set_customer_in_address" |
Rushabh Mehta | f16f9c5 | 2016-04-08 17:20:50 +0530 | [diff] [blame] | 137 | }, |
| 138 | |
| 139 | # bubble transaction notification on master |
Rushabh Mehta | 5d0e8de | 2016-04-11 17:34:25 +0530 | [diff] [blame] | 140 | ('Opportunity', 'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice', |
| 141 | 'Supplier Quotation', 'Purchase Order', 'Purchase Receipt', |
| 142 | 'Purchase Invoice', 'Project', 'Issue'): { |
Rushabh Mehta | f4d1b18 | 2016-04-11 11:34:59 +0530 | [diff] [blame] | 143 | 'on_change': 'erpnext.accounts.party_status.notify_status' |
Anand Doshi | e3bd78e | 2016-04-22 18:53:21 +0530 | [diff] [blame] | 144 | }, |
| 145 | |
| 146 | "Website Settings": { |
| 147 | "validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products" |
| 148 | } |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | scheduler_events = { |
Nabin Hait | 7580723 | 2015-07-02 14:41:27 +0530 | [diff] [blame] | 152 | "hourly": [ |
| 153 | "erpnext.controllers.recurring_document.create_recurring_documents" |
| 154 | ], |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 155 | "daily": [ |
Rushabh Mehta | f850987 | 2014-10-08 12:03:19 +0530 | [diff] [blame] | 156 | "erpnext.stock.reorder_item.reorder_item", |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 157 | "erpnext.setup.doctype.email_digest.email_digest.send", |
Nabin Hait | 606af96 | 2014-12-15 11:57:03 +0530 | [diff] [blame] | 158 | "erpnext.support.doctype.issue.issue.auto_close_tickets", |
Rushabh Mehta | 5bceebc | 2015-01-23 15:22:13 +0530 | [diff] [blame] | 159 | "erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year", |
Rushabh Mehta | 13ec41a | 2015-12-10 12:31:36 +0530 | [diff] [blame] | 160 | "erpnext.hr.doctype.employee.employee.send_birthday_reminders", |
Nabin Hait | 4fdb052 | 2016-03-09 12:40:56 +0530 | [diff] [blame] | 161 | "erpnext.projects.doctype.task.task.set_tasks_as_overdue", |
| 162 | "erpnext.accounts.doctype.asset.depreciation.post_depreciation_entries" |
Rushabh Mehta | 4ceb20e | 2014-05-02 12:14:03 +0530 | [diff] [blame] | 163 | ] |
| 164 | } |
Anand Doshi | 7f41ff2 | 2014-06-26 12:02:55 +0530 | [diff] [blame] | 165 | |
Anand Doshi | c5f919e | 2015-09-16 19:20:55 +0530 | [diff] [blame] | 166 | default_mail_footer = """<div style="text-align: center;"> |
Nabin Hait | b3a142f | 2015-05-26 12:13:30 +0530 | [diff] [blame] | 167 | <a href="https://erpnext.com?source=via_email_footer" target="_blank" style="color: #8d99a6;"> |
| 168 | Sent via ERPNext |
Anand Doshi | adcf857 | 2015-03-27 17:42:03 +0530 | [diff] [blame] | 169 | </a> |
| 170 | </div>""" |
Anand Doshi | c82331b | 2015-02-12 18:58:28 +0530 | [diff] [blame] | 171 | |
| 172 | get_translated_dict = { |
Anand Doshi | c82331b | 2015-02-12 18:58:28 +0530 | [diff] [blame] | 173 | ("doctype", "Global Defaults"): "frappe.geo.country_info.get_translated_dict" |
| 174 | } |
Rushabh Mehta | fe027b3 | 2016-03-28 13:21:43 +0530 | [diff] [blame] | 175 | |
| 176 | bot_parsers = [ |
| 177 | 'erpnext.utilities.bot.FindItemBot', |
Rushabh Mehta | 0c76f21 | 2016-04-01 11:53:50 +0530 | [diff] [blame] | 178 | ] |