blob: 65953ece3d0125c9cb0d631b495db77eabf53d17 [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 Mehta2167ff52016-12-07 11:08:48 +05308app_icon = "fa fa-th"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +05309app_color = "#e74c3c"
Nabin Hait7ba4d022015-11-05 16:55:10 +053010app_email = "info@erpnext.com"
11app_license = "GNU General Public License (v3)"
Rushabh Mehta7d23e422015-11-02 10:45:18 +053012source_link = "https://github.com/frappe/erpnext"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053013
Rushabh Mehta4b99fe12017-09-30 11:41:26 +053014develop_version = '9.x.x-develop'
Rushabh Mehtadb206f22017-03-10 09:38:58 +053015
Anand Doshi0c3bb752014-07-09 12:59:56 +053016error_report_email = "support@erpnext.com"
17
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053018app_include_js = "assets/js/erpnext.min.js"
19app_include_css = "assets/css/erpnext.css"
20web_include_js = "assets/js/erpnext-web.min.js"
Anand Doshida858cc2015-02-24 17:50:44 +053021web_include_css = "assets/erpnext/css/website.css"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053022
mbauskarf54b1042017-03-13 16:32:46 +053023doctype_js = {
24 "Communication": "public/js/communication.js",
25}
26
Rushabh Mehta37b4d752015-11-09 16:53:11 +053027# setup wizard
28setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
29setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_complete"
Prateeksha Singh95d8fd32017-09-04 11:14:04 +053030setup_wizard_test = "erpnext.setup.setup_wizard.test_setup_wizard.run_setup_wizard_test"
Rushabh Mehta37b4d752015-11-09 16:53:11 +053031
Rushabh Mehtad55bdcf2015-12-31 11:12:48 +053032before_install = "erpnext.setup.install.check_setup_wizard_not_completed"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053033after_install = "erpnext.setup.install.after_install"
34
35boot_session = "erpnext.startup.boot.boot_session"
36notification_config = "erpnext.startup.notifications.get_notification_config"
Rushabh Mehta05ce7ec2017-02-22 16:15:43 +053037get_help_messages = "erpnext.utilities.activation.get_help_messages"
Prateeksha Singh95d8fd32017-09-04 11:14:04 +053038get_user_progress_slides = "erpnext.utilities.user_progress.get_user_progress_slides"
39update_and_get_user_progress = "erpnext.utilities.user_progress_utils.update_default_domain_actions_and_get_state"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053040
Rushabh Mehta3daa49a2014-10-21 16:16:30 +053041on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
42on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
Anand Doshif9fc04c2015-02-23 22:14:12 +053043
Manas Solanki84e9d452017-11-28 18:04:08 +053044treeviews = ['Account', 'Cost Center', 'Warehouse', 'Item Group', 'Customer Group', 'Sales Person', 'Territory', 'Assessment Group']
Rushabh Mehta764aa922016-05-02 13:28:46 +053045
Anand Doshif9fc04c2015-02-23 22:14:12 +053046# website
47update_website_context = "erpnext.shopping_cart.utils.update_website_context"
48my_account_context = "erpnext.shopping_cart.utils.update_my_account_context"
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053049
Makarand Bauskar1b67d712017-10-04 15:55:56 +053050email_append_to = ["Job Applicant", "Lead", "Opportunity", "Issue"]
Anand Doshif9fc04c2015-02-23 22:14:12 +053051
Manas Solanki84e9d452017-11-28 18:04:08 +053052calendars = ["Task", "Production Order", "Leave Application", "Sales Order", "Holiday List", "Course Schedule"]
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053053
hiousid81e9f32017-11-17 07:12:24 +010054
Kanchan Chauhan1f3d5b72016-03-01 11:33:49 +053055
Rushabh Mehtabc4e2cd2017-10-17 12:30:34 +053056domains = {
57 'Distribution': 'erpnext.domains.distribution',
58 'Education': 'erpnext.domains.education',
59 'Healthcare': 'erpnext.domains.healthcare',
60 'Hospitality': 'erpnext.domains.hospitality',
61 'Manufacturing': 'erpnext.domains.manufacturing',
62 'Retail': 'erpnext.domains.retail',
63 'Services': 'erpnext.domains.services',
64}
65
Rushabh Mehtadbb51542017-08-10 21:06:09 +053066website_generators = ["Item Group", "Item", "BOM", "Sales Partner",
67 "Job Opening", "Student Admission"]
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053068
Rushabh Mehta2e7c36e2015-04-16 12:41:42 +053069website_context = {
Rushabh Mehta5674c4f2015-04-16 15:09:42 +053070 "favicon": "/assets/erpnext/images/favicon.png",
Rushabh Mehtad40e6612017-01-10 14:46:45 +053071 "splash_image": "/assets/erpnext/images/erp-icon.svg"
Rushabh Mehta2e7c36e2015-04-16 12:41:42 +053072}
73
Anand Doshif9fc04c2015-02-23 22:14:12 +053074website_route_rules = [
75 {"from_route": "/orders", "to_route": "Sales Order"},
Rushabh Mehta156ce602015-09-11 18:49:59 +053076 {"from_route": "/orders/<path:name>", "to_route": "order",
77 "defaults": {
78 "doctype": "Sales Order",
Britlog4c7709e2017-07-28 15:24:22 +020079 "parents": [{"label": _("Orders"), "route": "orders"}]
Rushabh Mehta156ce602015-09-11 18:49:59 +053080 }
81 },
Anand Doshif9fc04c2015-02-23 22:14:12 +053082 {"from_route": "/invoices", "to_route": "Sales Invoice"},
Rushabh Mehta156ce602015-09-11 18:49:59 +053083 {"from_route": "/invoices/<path:name>", "to_route": "order",
84 "defaults": {
85 "doctype": "Sales Invoice",
Britlog4c7709e2017-07-28 15:24:22 +020086 "parents": [{"label": _("Invoices"), "route": "invoices"}]
Rushabh Mehta156ce602015-09-11 18:49:59 +053087 }
88 },
Makarand Bauskar9306aff2017-07-21 15:19:47 +053089 {"from_route": "/supplier-quotations", "to_route": "Supplier Quotation"},
90 {"from_route": "/supplier-quotations/<path:name>", "to_route": "order",
Rohit Waghchaure21499e82016-09-21 16:49:58 +053091 "defaults": {
92 "doctype": "Supplier Quotation",
Brown-Harry Bomad3fa1912017-09-27 08:23:38 +010093 "parents": [{"label": _("Supplier Quotation"), "route": "supplier-quotations"}]
Rohit Waghchaure21499e82016-09-21 16:49:58 +053094 }
95 },
Makarand Bauskar9306aff2017-07-21 15:19:47 +053096 {"from_route": "/quotations", "to_route": "Quotation"},
97 {"from_route": "/quotations/<path:name>", "to_route": "order",
98 "defaults": {
99 "doctype": "Quotation",
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530100 "parents": [{"label": _("Quotations"), "route": "quotations"}]
Makarand Bauskar9306aff2017-07-21 15:19:47 +0530101 }
102 },
Anand Doshif9fc04c2015-02-23 22:14:12 +0530103 {"from_route": "/shipments", "to_route": "Delivery Note"},
Rushabh Mehta156ce602015-09-11 18:49:59 +0530104 {"from_route": "/shipments/<path:name>", "to_route": "order",
105 "defaults": {
Anand Doshi4b127402015-11-26 18:22:03 +0530106 "doctype": "Delivery Note",
Britlog4c7709e2017-07-28 15:24:22 +0200107 "parents": [{"label": _("Shipments"), "route": "shipments"}]
Rushabh Mehta156ce602015-09-11 18:49:59 +0530108 }
Kanchan Chauhan2e8cc892016-02-19 17:27:23 +0530109 },
rohitwaghchaurea1064a62016-03-03 14:00:35 +0530110 {"from_route": "/rfq", "to_route": "Request for Quotation"},
111 {"from_route": "/rfq/<path:name>", "to_route": "rfq",
112 "defaults": {
113 "doctype": "Request for Quotation",
Britlog4c7709e2017-07-28 15:24:22 +0200114 "parents": [{"label": _("Request for Quotation"), "route": "rfq"}]
rohitwaghchaurea1064a62016-03-03 14:00:35 +0530115 }
116 },
Kanchan Chauhan1605ff02016-07-04 14:28:09 +0530117 {"from_route": "/addresses", "to_route": "Address"},
118 {"from_route": "/addresses/<path:name>", "to_route": "addresses",
119 "defaults": {
120 "doctype": "Address",
Britlog4c7709e2017-07-28 15:24:22 +0200121 "parents": [{"label": _("Addresses"), "route": "addresses"}]
Kanchan Chauhan1605ff02016-07-04 14:28:09 +0530122 }
123 },
Kanchan Chauhan2e8cc892016-02-19 17:27:23 +0530124 {"from_route": "/jobs", "to_route": "Job Opening"},
Neil Trini Lasrado83d81202016-09-15 14:48:13 +0530125 {"from_route": "/admissions", "to_route": "Student Admission"},
Vishal Dhayagudeedb27492017-07-25 10:53:12 +0530126 {"from_route": "/boms", "to_route": "BOM"},
127 {"from_route": "/timesheets", "to_route": "Timesheet"},
Anand Doshif9fc04c2015-02-23 22:14:12 +0530128]
129
Rushabh Mehtab9cdb052017-03-08 12:33:43 +0530130standard_portal_menu_items = [
Rushabh Mehta0c76f212016-04-01 11:53:50 +0530131 {"title": _("Projects"), "route": "/project", "reference_doctype": "Project"},
Rushabh Mehtafc800b32016-09-23 21:51:51 +0530132 {"title": _("Request for Quotations"), "route": "/rfq", "reference_doctype": "Request for Quotation", "role": "Supplier"},
Makarand Bauskar9306aff2017-07-21 15:19:47 +0530133 {"title": _("Supplier Quotation"), "route": "/supplier-quotations", "reference_doctype": "Supplier Quotation", "role": "Supplier"},
134 {"title": _("Quotations"), "route": "/quotations", "reference_doctype": "Quotation", "role":"Customer"},
Rushabh Mehtafc800b32016-09-23 21:51:51 +0530135 {"title": _("Orders"), "route": "/orders", "reference_doctype": "Sales Order", "role":"Customer"},
136 {"title": _("Invoices"), "route": "/invoices", "reference_doctype": "Sales Invoice", "role":"Customer"},
137 {"title": _("Shipments"), "route": "/shipments", "reference_doctype": "Delivery Note", "role":"Customer"},
138 {"title": _("Issues"), "route": "/issues", "reference_doctype": "Issue", "role":"Customer"},
Neil Trini Lasrado3f0a5812016-07-19 14:17:33 +0530139 {"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"},
Manas Solankie716da02017-09-18 16:00:34 +0530140 {"title": _("Timesheets"), "route": "/timesheets", "reference_doctype": "Timesheet", "role":"Customer"},
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530141 {"title": _("Timesheets"), "route": "/timesheets", "reference_doctype": "Timesheet", "role":"Customer"},
142 {"title": _("Lab Test"), "route": "/lab-test", "reference_doctype": "Lab Test", "role":"Patient"},
143 {"title": _("Prescription"), "route": "/prescription", "reference_doctype": "Consultation", "role":"Patient"},
Manas Solankie716da02017-09-18 16:00:34 +0530144 {"title": _("Patient Appointment"), "route": "/patient-appointments", "reference_doctype": "Patient Appointment", "role":"Patient"},
145 {"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees", "role":"Student"},
Manas Solanki05180012017-10-05 14:31:31 +0530146 {"title": _("Newsletter"), "route": "/newsletters", "reference_doctype": "Newsletter"},
147 {"title": _("Admission"), "route": "/admissions", "reference_doctype": "Student Admission"}
Rushabh Mehtafc800b32016-09-23 21:51:51 +0530148]
149
150default_roles = [
Rushabh Mehta95439db2017-01-14 00:25:22 +0530151 {'role': 'Customer', 'doctype':'Contact', 'email_field': 'email_id'},
152 {'role': 'Supplier', 'doctype':'Contact', 'email_field': 'email_id'},
Vishal Dhayagudeedb27492017-07-25 10:53:12 +0530153 {'role': 'Student', 'doctype':'Student', 'email_field': 'student_email_id'},
Rushabh Mehtac78b3112016-03-30 12:29:48 +0530154]
155
Anand Doshif9fc04c2015-02-23 22:14:12 +0530156has_website_permission = {
157 "Sales Order": "erpnext.controllers.website_list_for_contact.has_website_permission",
Makarand Bauskar9306aff2017-07-21 15:19:47 +0530158 "Quotation": "erpnext.controllers.website_list_for_contact.has_website_permission",
Anand Doshif9fc04c2015-02-23 22:14:12 +0530159 "Sales Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission",
Rohit Waghchaure21499e82016-09-21 16:49:58 +0530160 "Supplier Quotation": "erpnext.controllers.website_list_for_contact.has_website_permission",
Rushabh Mehtaa33d4682015-06-01 17:15:42 +0530161 "Delivery Note": "erpnext.controllers.website_list_for_contact.has_website_permission",
Vishal Dhayagudeedb27492017-07-25 10:53:12 +0530162 "Issue": "erpnext.support.doctype.issue.issue.has_website_permission",
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530163 "Timesheet": "erpnext.controllers.website_list_for_contact.has_website_permission",
164 "Lab Test": "erpnext.healthcare.web_form.lab_test.lab_test.has_website_permission",
165 "Consultation": "erpnext.healthcare.web_form.prescription.prescription.has_website_permission",
166 "Patient Appointment": "erpnext.healthcare.web_form.patient_appointments.patient_appointments.has_website_permission"
Anand Doshif9fc04c2015-02-23 22:14:12 +0530167}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530168
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530169dump_report_map = "erpnext.startup.report_data_map.data_map"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530170
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530171before_tests = "erpnext.setup.utils.before_tests"
172
Rushabh Mehta308e6ea2015-03-24 17:34:58 +0530173standard_queries = {
174 "Customer": "erpnext.selling.doctype.customer.customer.get_customer_list"
175}
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530176
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530177doc_events = {
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530178 "Stock Entry": {
Nabin Hait4acd4312014-11-04 15:32:31 +0530179 "on_submit": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty",
180 "on_cancel": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty"
Anand Doshi648062d2014-05-05 16:46:14 +0530181 },
182 "User": {
KanchanChauhan1dc26b12017-06-13 15:26:35 +0530183 "after_insert": "frappe.contacts.doctype.contact.contact.update_contact",
Anand Doshi49856912014-05-28 18:49:13 +0530184 "validate": "erpnext.hr.doctype.employee.employee.validate_employee_role",
Rushabh Mehta0d6db6c2017-03-31 23:01:45 +0530185 "on_update": ["erpnext.hr.doctype.employee.employee.update_user_permissions",
186 "erpnext.portal.utils.set_default_role"]
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530187 },
Rushabh Mehtaf16f9c52016-04-08 17:20:50 +0530188 ("Sales Taxes and Charges Template", 'Price List'): {
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530189 "on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings"
190 },
Rushabh Mehtaf16f9c52016-04-08 17:20:50 +0530191
Anand Doshie3bd78e2016-04-22 18:53:21 +0530192 "Website Settings": {
193 "validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products"
Saurabhe4e89542016-07-21 20:26:46 +0530194 },
195 "Payment Entry": {
196 "on_submit": "erpnext.accounts.doctype.payment_request.payment_request.make_status_as_paid"
Rushabh Mehtab3c8f442017-06-21 17:22:38 +0530197 },
198 'Address': {
199 'validate': 'erpnext.regional.india.utils.validate_gstin_for_india'
Anand Doshie3bd78e2016-04-22 18:53:21 +0530200 }
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530201}
202
203scheduler_events = {
Nabin Hait75807232015-07-02 14:41:27 +0530204 "hourly": [
rohitwaghchaure850eaa72017-09-15 16:16:36 +0530205 "erpnext.accounts.doctype.subscription.subscription.make_subscription_entry",
Rushabh Mehtafe816c32016-11-08 18:18:40 +0530206 'erpnext.hr.doctype.daily_work_summary_settings.daily_work_summary_settings.trigger_emails'
Nabin Hait75807232015-07-02 14:41:27 +0530207 ],
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530208 "daily": [
Rushabh Mehtaf8509872014-10-08 12:03:19 +0530209 "erpnext.stock.reorder_item.reorder_item",
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530210 "erpnext.setup.doctype.email_digest.email_digest.send",
Nabin Hait606af962014-12-15 11:57:03 +0530211 "erpnext.support.doctype.issue.issue.auto_close_tickets",
mbauskare1e25a02017-02-16 19:36:59 +0530212 "erpnext.crm.doctype.opportunity.opportunity.auto_close_opportunity",
Rohit Waghchaure2f1db572016-11-08 12:39:33 +0530213 "erpnext.controllers.accounts_controller.update_invoice_status",
Rushabh Mehta5bceebc2015-01-23 15:22:13 +0530214 "erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year",
Rushabh Mehta13ec41a2015-12-10 12:31:36 +0530215 "erpnext.hr.doctype.employee.employee.send_birthday_reminders",
Nabin Hait4fdb0522016-03-09 12:40:56 +0530216 "erpnext.projects.doctype.task.task.set_tasks_as_overdue",
Kanchan Chauhane58a41a2017-10-17 15:17:24 +0530217 "erpnext.assets.doctype.asset.depreciation.post_depreciation_entries",
Manas Solanki253c53c2017-05-30 15:35:58 +0530218 "erpnext.hr.doctype.daily_work_summary_settings.daily_work_summary_settings.send_summary",
Prateeksha Singhe012e242017-07-18 10:35:12 +0530219 "erpnext.stock.doctype.serial_no.serial_no.update_maintenance_status",
bcornwellmott96381da2017-07-24 10:12:30 -0700220 "erpnext.buying.doctype.supplier_scorecard.supplier_scorecard.refresh_scorecards",
Nabin Haitadbf8ad2017-07-31 20:45:36 +0530221 "erpnext.setup.doctype.company.company.cache_companies_monthly_sales_history",
Nabin Hait26507d72017-10-05 13:10:32 +0530222 "erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.update_latest_price_in_all_boms"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530223 ]
224}
Anand Doshi7f41ff22014-06-26 12:02:55 +0530225
Faris Ansari2c5b3e82017-07-13 18:37:18 +0530226email_brand_image = "assets/erpnext/images/erpnext-logo.jpg"
227
Faris Ansari40d3ad22017-07-31 16:16:22 +0530228default_mail_footer = """
229 <span>
230 Sent via
231 <a class="text-muted" href="https://erpnext.com?source=via_email_footer" target="_blank">
232 ERPNext
233 </a>
234 </span>
235"""
Anand Doshic82331b2015-02-12 18:58:28 +0530236
237get_translated_dict = {
Anand Doshic82331b2015-02-12 18:58:28 +0530238 ("doctype", "Global Defaults"): "frappe.geo.country_info.get_translated_dict"
239}
Rushabh Mehtafe027b32016-03-28 13:21:43 +0530240
241bot_parsers = [
242 'erpnext.utilities.bot.FindItemBot',
Rushabh Mehta0c76f212016-04-01 11:53:50 +0530243]
Anand Doshif576f3b2016-06-25 19:51:48 +0530244
245get_site_info = 'erpnext.utilities.get_site_info'
Saurabh94c666a2016-11-08 20:35:50 +0530246
Saurabh0d47d512017-03-14 14:46:05 +0530247payment_gateway_enabled = "erpnext.accounts.utils.create_payment_gateway_account"
Rushabh Mehta7231f292017-07-13 15:00:56 +0530248
249regional_overrides = {
250 'India': {
Nabin Haitb962fc12017-07-17 18:02:31 +0530251 'erpnext.tests.test_regional.test_method': 'erpnext.regional.india.utils.test_method',
252 'erpnext.controllers.taxes_and_totals.get_itemised_tax_breakup_header': 'erpnext.regional.india.utils.get_itemised_tax_breakup_header',
253 'erpnext.controllers.taxes_and_totals.get_itemised_tax_breakup_data': 'erpnext.regional.india.utils.get_itemised_tax_breakup_data'
Rushabh Mehta7231f292017-07-13 15:00:56 +0530254 }
255}