blob: f47185e267d52aad8acadda29628d7ff268e6852 [file] [log] [blame]
Anand Doshid57e7932015-02-24 12:24:53 +05301from __future__ import unicode_literals
Rushabh Mehta156ce602015-09-11 18:49:59 +05302from frappe import _
3
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +05304app_name = "erpnext"
5app_title = "ERPNext"
Rushabh Mehtaba02ce62015-07-22 15:07:25 +05306app_publisher = "Frappe Technologies Pvt. Ltd."
Rushabh Mehtaedc8ab02015-11-18 16:48:19 +05307app_description = """ERP made simple"""
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +05308app_icon = "icon-th"
9app_color = "#e74c3c"
Rushabh Mehta6fa497c2016-02-29 15:20:54 +060010app_version = "6.23.7"
Nabin Hait7ba4d022015-11-05 16:55:10 +053011app_email = "info@erpnext.com"
12app_license = "GNU General Public License (v3)"
Rushabh Mehta7d23e422015-11-02 10:45:18 +053013source_link = "https://github.com/frappe/erpnext"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053014
Anand Doshi0c3bb752014-07-09 12:59:56 +053015error_report_email = "support@erpnext.com"
16
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053017app_include_js = "assets/js/erpnext.min.js"
18app_include_css = "assets/css/erpnext.css"
19web_include_js = "assets/js/erpnext-web.min.js"
Anand Doshida858cc2015-02-24 17:50:44 +053020web_include_css = "assets/erpnext/css/website.css"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053021
Rushabh Mehta37b4d752015-11-09 16:53:11 +053022# setup wizard
23setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
24setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_complete"
25
Rushabh Mehtad55bdcf2015-12-31 11:12:48 +053026before_install = "erpnext.setup.install.check_setup_wizard_not_completed"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053027after_install = "erpnext.setup.install.after_install"
28
29boot_session = "erpnext.startup.boot.boot_session"
30notification_config = "erpnext.startup.notifications.get_notification_config"
31
Rushabh Mehta3daa49a2014-10-21 16:16:30 +053032on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
33on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
Anand Doshif9fc04c2015-02-23 22:14:12 +053034
35# website
36update_website_context = "erpnext.shopping_cart.utils.update_website_context"
37my_account_context = "erpnext.shopping_cart.utils.update_my_account_context"
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053038
Rushabh Mehta4c466872015-04-02 22:00:34 +053039email_append_to = ["Job Applicant", "Opportunity", "Issue"]
Anand Doshif9fc04c2015-02-23 22:14:12 +053040
Saurabh1d753c92015-10-06 15:21:23 +053041calendars = ["Task", "Production Order", "Time Log", "Leave Application", "Sales Order", "Holiday List"]
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053042
Kanchan Chauhan1f3d5b72016-03-01 11:33:49 +053043fixtures = ["Web Form"]
44
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053045website_generators = ["Item Group", "Item", "Sales Partner"]
46
Rushabh Mehta2e7c36e2015-04-16 12:41:42 +053047website_context = {
Rushabh Mehta5674c4f2015-04-16 15:09:42 +053048 "favicon": "/assets/erpnext/images/favicon.png",
49 "splash_image": "/assets/erpnext/images/splash.png"
Rushabh Mehta2e7c36e2015-04-16 12:41:42 +053050}
51
Anand Doshif9fc04c2015-02-23 22:14:12 +053052website_route_rules = [
53 {"from_route": "/orders", "to_route": "Sales Order"},
Rushabh Mehta156ce602015-09-11 18:49:59 +053054 {"from_route": "/orders/<path:name>", "to_route": "order",
55 "defaults": {
56 "doctype": "Sales Order",
57 "parents": [{"title": _("Orders"), "name": "orders"}]
58 }
59 },
Anand Doshif9fc04c2015-02-23 22:14:12 +053060 {"from_route": "/invoices", "to_route": "Sales Invoice"},
Rushabh Mehta156ce602015-09-11 18:49:59 +053061 {"from_route": "/invoices/<path:name>", "to_route": "order",
62 "defaults": {
63 "doctype": "Sales Invoice",
64 "parents": [{"title": _("Invoices"), "name": "invoices"}]
65 }
66 },
Anand Doshif9fc04c2015-02-23 22:14:12 +053067 {"from_route": "/shipments", "to_route": "Delivery Note"},
Rushabh Mehta156ce602015-09-11 18:49:59 +053068 {"from_route": "/shipments/<path:name>", "to_route": "order",
69 "defaults": {
Anand Doshi4b127402015-11-26 18:22:03 +053070 "doctype": "Delivery Note",
Rushabh Mehta156ce602015-09-11 18:49:59 +053071 "parents": [{"title": _("Shipments"), "name": "shipments"}]
72 }
Kanchan Chauhan2e8cc892016-02-19 17:27:23 +053073 },
74 {"from_route": "/jobs", "to_route": "Job Opening"},
75 {"from_route": "/jobs/<path:name>", "to_route": "job_opening",
76 "defaults": {
77 "doctype": "Job Opening",
78 "parents": [{"title": _("Job Opening"), "name": "jobs"}]
79 }
Rushabh Mehta156ce602015-09-11 18:49:59 +053080 }
Anand Doshif9fc04c2015-02-23 22:14:12 +053081]
82
83has_website_permission = {
84 "Sales Order": "erpnext.controllers.website_list_for_contact.has_website_permission",
85 "Sales Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission",
Rushabh Mehtaa33d4682015-06-01 17:15:42 +053086 "Delivery Note": "erpnext.controllers.website_list_for_contact.has_website_permission",
Rushabh Mehta834b3e62015-11-13 14:37:52 +053087 "Issue": "erpnext.support.doctype.issue.issue.has_website_permission",
88 "Address": "erpnext.utilities.doctype.address.address.has_website_permission"
Anand Doshif9fc04c2015-02-23 22:14:12 +053089}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +053090
Anand Doshi89b8d112015-09-29 20:06:53 +053091permission_query_conditions = {
92 "Contact": "erpnext.utilities.address_and_contact.get_permission_query_conditions_for_contact",
93 "Address": "erpnext.utilities.address_and_contact.get_permission_query_conditions_for_address"
94}
95
96has_permission = {
97 "Contact": "erpnext.utilities.address_and_contact.has_permission",
98 "Address": "erpnext.utilities.address_and_contact.has_permission"
99}
100
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530101dump_report_map = "erpnext.startup.report_data_map.data_map"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530102
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530103before_tests = "erpnext.setup.utils.before_tests"
104
Rushabh Mehta308e6ea2015-03-24 17:34:58 +0530105standard_queries = {
106 "Customer": "erpnext.selling.doctype.customer.customer.get_customer_list"
107}
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530108
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530109doc_events = {
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530110 "Stock Entry": {
Nabin Hait4acd4312014-11-04 15:32:31 +0530111 "on_submit": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty",
112 "on_cancel": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty"
Anand Doshi648062d2014-05-05 16:46:14 +0530113 },
114 "User": {
Anand Doshi49856912014-05-28 18:49:13 +0530115 "validate": "erpnext.hr.doctype.employee.employee.validate_employee_role",
Anand Doshia8ce5702014-05-27 13:46:42 +0530116 "on_update": "erpnext.hr.doctype.employee.employee.update_user_permissions"
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530117 },
Rushabh Mehtabcdea3e2015-05-06 18:45:47 +0530118 "Sales Taxes and Charges Template": {
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530119 "on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings"
120 },
121 "Price List": {
122 "on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings"
123 },
Anand Doshicc24d282015-12-08 12:34:01 +0530124 "Address": {
125 "validate": "erpnext.shopping_cart.cart.set_customer_in_address"
126 }
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530127}
128
129scheduler_events = {
Nabin Hait75807232015-07-02 14:41:27 +0530130 "hourly": [
131 "erpnext.controllers.recurring_document.create_recurring_documents"
132 ],
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530133 "daily": [
Rushabh Mehtaf8509872014-10-08 12:03:19 +0530134 "erpnext.stock.reorder_item.reorder_item",
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530135 "erpnext.setup.doctype.email_digest.email_digest.send",
Nabin Hait606af962014-12-15 11:57:03 +0530136 "erpnext.support.doctype.issue.issue.auto_close_tickets",
Rushabh Mehta5bceebc2015-01-23 15:22:13 +0530137 "erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year",
Rushabh Mehta13ec41a2015-12-10 12:31:36 +0530138 "erpnext.hr.doctype.employee.employee.send_birthday_reminders",
139 "erpnext.projects.doctype.task.task.set_tasks_as_overdue"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530140 ]
141}
Anand Doshi7f41ff22014-06-26 12:02:55 +0530142
Anand Doshic5f919e2015-09-16 19:20:55 +0530143default_mail_footer = """<div style="text-align: center;">
Nabin Haitb3a142f2015-05-26 12:13:30 +0530144 <a href="https://erpnext.com?source=via_email_footer" target="_blank" style="color: #8d99a6;">
145 Sent via ERPNext
Anand Doshiadcf8572015-03-27 17:42:03 +0530146 </a>
147</div>"""
Anand Doshic82331b2015-02-12 18:58:28 +0530148
149get_translated_dict = {
Anand Doshic82331b2015-02-12 18:58:28 +0530150 ("doctype", "Global Defaults"): "frappe.geo.country_info.get_translated_dict"
151}