blob: e8822a7dcfa44b4c3889f0998f31a20df53df3cb [file] [log] [blame]
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +05301app_name = "erpnext"
2app_title = "ERPNext"
Rushabh Mehtaba02ce62015-07-22 15:07:25 +05303app_publisher = "Frappe Technologies Pvt. Ltd."
Rushabh Mehtaedc8ab02015-11-18 16:48:19 +05304app_description = """ERP made simple"""
Rushabh Mehta2167ff52016-12-07 11:08:48 +05305app_icon = "fa fa-th"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +05306app_color = "#e74c3c"
Nabin Hait7ba4d022015-11-05 16:55:10 +05307app_email = "info@erpnext.com"
8app_license = "GNU General Public License (v3)"
Rushabh Mehta7d23e422015-11-02 10:45:18 +05309source_link = "https://github.com/frappe/erpnext"
Shivam Mishra8261df22020-10-19 13:52:35 +053010app_logo_url = "/assets/erpnext/images/erpnext-logo.svg"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053011
scmmishra734d3e02018-11-03 18:03:35 +053012
Ankush Menat95e41b02022-05-08 22:04:00 +053013develop_version = "14.x.x-develop"
Rushabh Mehtadb206f22017-03-10 09:38:58 +053014
Faris Ansari464d8382021-05-07 14:53:42 +053015app_include_js = "erpnext.bundle.js"
16app_include_css = "erpnext.bundle.css"
17web_include_js = "erpnext-web.bundle.js"
18web_include_css = "erpnext-web.bundle.css"
Suraj Shetty815aad12021-05-23 13:31:54 +053019email_css = "email_erpnext.bundle.css"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053020
mbauskarf54b1042017-03-13 16:32:46 +053021doctype_js = {
Abhishek Balam346ca562020-10-14 18:11:04 +053022 "Address": "public/js/address.js",
mbauskarf54b1042017-03-13 16:32:46 +053023 "Communication": "public/js/communication.js",
Faris Ansari5f8b3582019-03-19 11:48:32 +053024 "Event": "public/js/event.js",
Noah Jacobcbddeda2021-07-26 12:54:35 +053025 "Newsletter": "public/js/newsletter.js",
Ankush Menat494bd9e2022-03-28 18:52:46 +053026 "Contact": "public/js/contact.js",
mbauskarf54b1042017-03-13 16:32:46 +053027}
28
Ankush Menat494bd9e2022-03-28 18:52:46 +053029override_doctype_class = {"Address": "erpnext.accounts.custom.address.ERPNextAddress"}
Abhishek Balam6e9e7b42020-10-14 19:31:37 +053030
Neil Trini Lasrado771fbb82018-08-24 15:15:56 +053031welcome_email = "erpnext.setup.utils.welcome_email"
32
Rushabh Mehta37b4d752015-11-09 16:53:11 +053033# setup wizard
34setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
Prateeksha Singh8b0b56d2017-12-21 11:55:58 +053035setup_wizard_stages = "erpnext.setup.setup_wizard.setup_wizard.get_setup_stages"
Prateeksha Singh95d8fd32017-09-04 11:14:04 +053036setup_wizard_test = "erpnext.setup.setup_wizard.test_setup_wizard.run_setup_wizard_test"
Rushabh Mehta37b4d752015-11-09 16:53:11 +053037
Rushabh Mehtad55bdcf2015-12-31 11:12:48 +053038before_install = "erpnext.setup.install.check_setup_wizard_not_completed"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053039after_install = "erpnext.setup.install.after_install"
40
41boot_session = "erpnext.startup.boot.boot_session"
42notification_config = "erpnext.startup.notifications.get_notification_config"
Rushabh Mehta05ce7ec2017-02-22 16:15:43 +053043get_help_messages = "erpnext.utilities.activation.get_help_messages"
prssanna3f1444e2019-09-24 13:04:53 +053044leaderboards = "erpnext.startup.leaderboard.get_leaderboards"
Prssanna Desai82ddef52020-06-18 18:18:41 +053045filters_config = "erpnext.startup.filters.get_filters_config"
prssannab57b3c92020-10-22 15:37:47 +053046additional_print_settings = "erpnext.controllers.print_settings.get_print_settings"
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +053047
Faris Ansari38ac7f72019-10-09 11:41:33 +053048on_session_creation = [
49 "erpnext.portal.utils.create_customer_or_supplier",
Ankush Menat494bd9e2022-03-28 18:52:46 +053050 "erpnext.e_commerce.shopping_cart.utils.set_cart_count",
Faris Ansari38ac7f72019-10-09 11:41:33 +053051]
marination22f41a12021-02-25 13:56:38 +053052on_logout = "erpnext.e_commerce.shopping_cart.utils.clear_cart_count"
Anand Doshif9fc04c2015-02-23 22:14:12 +053053
Ankush Menat494bd9e2022-03-28 18:52:46 +053054treeviews = [
55 "Account",
56 "Cost Center",
57 "Warehouse",
58 "Item Group",
59 "Customer Group",
Deepesh Garg0a67b022022-04-16 19:43:59 +053060 "Supplier Group",
Ankush Menat494bd9e2022-03-28 18:52:46 +053061 "Sales Person",
62 "Territory",
Ankush Menat494bd9e2022-03-28 18:52:46 +053063 "Department",
64]
Rushabh Mehta764aa922016-05-02 13:28:46 +053065
Anand Doshif9fc04c2015-02-23 22:14:12 +053066# website
Ankush Menat494bd9e2022-03-28 18:52:46 +053067update_website_context = [
68 "erpnext.e_commerce.shopping_cart.utils.update_website_context",
Ankush Menat494bd9e2022-03-28 18:52:46 +053069]
marination22f41a12021-02-25 13:56:38 +053070my_account_context = "erpnext.e_commerce.shopping_cart.utils.update_my_account_context"
Shariq Ansari9aa6f522021-09-14 12:49:08 +053071webform_list_context = "erpnext.controllers.website_list_for_contact.get_webform_list_context"
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053072
Ankush Menat494bd9e2022-03-28 18:52:46 +053073calendars = [
74 "Task",
75 "Work Order",
76 "Leave Application",
77 "Sales Order",
78 "Holiday List",
Ankush Menat494bd9e2022-03-28 18:52:46 +053079]
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053080
Rucha Mahabal512c82f2022-06-10 15:06:54 +053081website_generators = ["Item Group", "Website Item", "BOM", "Sales Partner"]
Rushabh Mehta621d6ea2015-07-08 12:39:27 +053082
Rushabh Mehta2e7c36e2015-04-16 12:41:42 +053083website_context = {
Rucha Mahabal01bea142021-10-04 09:58:38 +053084 "favicon": "/assets/erpnext/images/erpnext-favicon.svg",
Ankush Menat494bd9e2022-03-28 18:52:46 +053085 "splash_image": "/assets/erpnext/images/erpnext-logo.svg",
Rushabh Mehta2e7c36e2015-04-16 12:41:42 +053086}
87
Rucha Mahabal108cce22022-07-07 19:00:19 +053088# nosemgrep
Anand Doshif9fc04c2015-02-23 22:14:12 +053089website_route_rules = [
90 {"from_route": "/orders", "to_route": "Sales Order"},
Ankush Menat494bd9e2022-03-28 18:52:46 +053091 {
92 "from_route": "/orders/<path:name>",
93 "to_route": "order",
Ankush Menat75983ce2022-11-05 18:49:15 +053094 "defaults": {"doctype": "Sales Order", "parents": [{"label": "Orders", "route": "orders"}]},
Rushabh Mehta156ce602015-09-11 18:49:59 +053095 },
Anand Doshif9fc04c2015-02-23 22:14:12 +053096 {"from_route": "/invoices", "to_route": "Sales Invoice"},
Ankush Menat494bd9e2022-03-28 18:52:46 +053097 {
98 "from_route": "/invoices/<path:name>",
99 "to_route": "order",
Rushabh Mehta156ce602015-09-11 18:49:59 +0530100 "defaults": {
101 "doctype": "Sales Invoice",
Ankush Menat75983ce2022-11-05 18:49:15 +0530102 "parents": [{"label": "Invoices", "route": "invoices"}],
Ankush Menat494bd9e2022-03-28 18:52:46 +0530103 },
Rushabh Mehta156ce602015-09-11 18:49:59 +0530104 },
Makarand Bauskar9306aff2017-07-21 15:19:47 +0530105 {"from_route": "/supplier-quotations", "to_route": "Supplier Quotation"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530106 {
107 "from_route": "/supplier-quotations/<path:name>",
108 "to_route": "order",
Rohit Waghchaure21499e82016-09-21 16:49:58 +0530109 "defaults": {
110 "doctype": "Supplier Quotation",
Ankush Menat75983ce2022-11-05 18:49:15 +0530111 "parents": [{"label": "Supplier Quotation", "route": "supplier-quotations"}],
Ankush Menat494bd9e2022-03-28 18:52:46 +0530112 },
Rohit Waghchaure21499e82016-09-21 16:49:58 +0530113 },
Faris Ansari38ac7f72019-10-09 11:41:33 +0530114 {"from_route": "/purchase-orders", "to_route": "Purchase Order"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530115 {
116 "from_route": "/purchase-orders/<path:name>",
117 "to_route": "order",
Faris Ansari38ac7f72019-10-09 11:41:33 +0530118 "defaults": {
119 "doctype": "Purchase Order",
Ankush Menat75983ce2022-11-05 18:49:15 +0530120 "parents": [{"label": "Purchase Order", "route": "purchase-orders"}],
Ankush Menat494bd9e2022-03-28 18:52:46 +0530121 },
Faris Ansari38ac7f72019-10-09 11:41:33 +0530122 },
123 {"from_route": "/purchase-invoices", "to_route": "Purchase Invoice"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530124 {
125 "from_route": "/purchase-invoices/<path:name>",
126 "to_route": "order",
Faris Ansari38ac7f72019-10-09 11:41:33 +0530127 "defaults": {
128 "doctype": "Purchase Invoice",
Ankush Menat75983ce2022-11-05 18:49:15 +0530129 "parents": [{"label": "Purchase Invoice", "route": "purchase-invoices"}],
Ankush Menat494bd9e2022-03-28 18:52:46 +0530130 },
Faris Ansari38ac7f72019-10-09 11:41:33 +0530131 },
Makarand Bauskar9306aff2017-07-21 15:19:47 +0530132 {"from_route": "/quotations", "to_route": "Quotation"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530133 {
134 "from_route": "/quotations/<path:name>",
135 "to_route": "order",
Makarand Bauskar9306aff2017-07-21 15:19:47 +0530136 "defaults": {
137 "doctype": "Quotation",
Ankush Menat75983ce2022-11-05 18:49:15 +0530138 "parents": [{"label": "Quotations", "route": "quotations"}],
Ankush Menat494bd9e2022-03-28 18:52:46 +0530139 },
Makarand Bauskar9306aff2017-07-21 15:19:47 +0530140 },
Anand Doshif9fc04c2015-02-23 22:14:12 +0530141 {"from_route": "/shipments", "to_route": "Delivery Note"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530142 {
143 "from_route": "/shipments/<path:name>",
144 "to_route": "order",
Rushabh Mehta156ce602015-09-11 18:49:59 +0530145 "defaults": {
Anand Doshi4b127402015-11-26 18:22:03 +0530146 "doctype": "Delivery Note",
Ankush Menat75983ce2022-11-05 18:49:15 +0530147 "parents": [{"label": "Shipments", "route": "shipments"}],
Ankush Menat494bd9e2022-03-28 18:52:46 +0530148 },
Kanchan Chauhan2e8cc892016-02-19 17:27:23 +0530149 },
rohitwaghchaurea1064a62016-03-03 14:00:35 +0530150 {"from_route": "/rfq", "to_route": "Request for Quotation"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530151 {
152 "from_route": "/rfq/<path:name>",
153 "to_route": "rfq",
rohitwaghchaurea1064a62016-03-03 14:00:35 +0530154 "defaults": {
155 "doctype": "Request for Quotation",
Ankush Menat75983ce2022-11-05 18:49:15 +0530156 "parents": [{"label": "Request for Quotation", "route": "rfq"}],
Ankush Menat494bd9e2022-03-28 18:52:46 +0530157 },
rohitwaghchaurea1064a62016-03-03 14:00:35 +0530158 },
Kanchan Chauhan1605ff02016-07-04 14:28:09 +0530159 {"from_route": "/addresses", "to_route": "Address"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530160 {
161 "from_route": "/addresses/<path:name>",
162 "to_route": "addresses",
Ankush Menat75983ce2022-11-05 18:49:15 +0530163 "defaults": {"doctype": "Address", "parents": [{"label": "Addresses", "route": "addresses"}]},
Kanchan Chauhan1605ff02016-07-04 14:28:09 +0530164 },
Vishal Dhayagudeedb27492017-07-25 10:53:12 +0530165 {"from_route": "/boms", "to_route": "BOM"},
166 {"from_route": "/timesheets", "to_route": "Timesheet"},
Doridel Cahanap2b14d6a2018-11-13 14:37:16 +0800167 {"from_route": "/material-requests", "to_route": "Material Request"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530168 {
169 "from_route": "/material-requests/<path:name>",
170 "to_route": "material_request_info",
Doridel Cahanap2b14d6a2018-11-13 14:37:16 +0800171 "defaults": {
172 "doctype": "Material Request",
Ankush Menat75983ce2022-11-05 18:49:15 +0530173 "parents": [{"label": "Material Request", "route": "material-requests"}],
Ankush Menat494bd9e2022-03-28 18:52:46 +0530174 },
Doridel Cahanap2b14d6a2018-11-13 14:37:16 +0800175 },
Ankush Menat494bd9e2022-03-28 18:52:46 +0530176 {"from_route": "/project", "to_route": "Project"},
Saurabh7cc99ab2022-11-21 17:41:42 +0530177 {"from_route": "/tasks", "to_route": "Task"},
Anand Doshif9fc04c2015-02-23 22:14:12 +0530178]
179
Rushabh Mehtab9cdb052017-03-08 12:33:43 +0530180standard_portal_menu_items = [
Ankush Menat75983ce2022-11-05 18:49:15 +0530181 {"title": "Projects", "route": "/project", "reference_doctype": "Project"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530182 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530183 "title": "Request for Quotations",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530184 "route": "/rfq",
185 "reference_doctype": "Request for Quotation",
186 "role": "Supplier",
187 },
188 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530189 "title": "Supplier Quotation",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530190 "route": "/supplier-quotations",
191 "reference_doctype": "Supplier Quotation",
192 "role": "Supplier",
193 },
194 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530195 "title": "Purchase Orders",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530196 "route": "/purchase-orders",
197 "reference_doctype": "Purchase Order",
198 "role": "Supplier",
199 },
200 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530201 "title": "Purchase Invoices",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530202 "route": "/purchase-invoices",
203 "reference_doctype": "Purchase Invoice",
204 "role": "Supplier",
205 },
206 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530207 "title": "Quotations",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530208 "route": "/quotations",
209 "reference_doctype": "Quotation",
210 "role": "Customer",
211 },
212 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530213 "title": "Orders",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530214 "route": "/orders",
215 "reference_doctype": "Sales Order",
216 "role": "Customer",
217 },
218 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530219 "title": "Invoices",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530220 "route": "/invoices",
221 "reference_doctype": "Sales Invoice",
222 "role": "Customer",
223 },
224 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530225 "title": "Shipments",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530226 "route": "/shipments",
227 "reference_doctype": "Delivery Note",
228 "role": "Customer",
229 },
Ankush Menat75983ce2022-11-05 18:49:15 +0530230 {"title": "Issues", "route": "/issues", "reference_doctype": "Issue", "role": "Customer"},
231 {"title": "Addresses", "route": "/addresses", "reference_doctype": "Address"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530232 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530233 "title": "Timesheets",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530234 "route": "/timesheets",
235 "reference_doctype": "Timesheet",
236 "role": "Customer",
237 },
Ankush Menat75983ce2022-11-05 18:49:15 +0530238 {"title": "Newsletter", "route": "/newsletters", "reference_doctype": "Newsletter"},
Ankush Menat494bd9e2022-03-28 18:52:46 +0530239 {
Ankush Menat75983ce2022-11-05 18:49:15 +0530240 "title": "Material Request",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530241 "route": "/material-requests",
242 "reference_doctype": "Material Request",
243 "role": "Customer",
244 },
Ankush Menat75983ce2022-11-05 18:49:15 +0530245 {"title": "Appointment Booking", "route": "/book_appointment"},
Rushabh Mehtafc800b32016-09-23 21:51:51 +0530246]
247
248default_roles = [
Ankush Menat494bd9e2022-03-28 18:52:46 +0530249 {"role": "Customer", "doctype": "Contact", "email_field": "email_id"},
250 {"role": "Supplier", "doctype": "Contact", "email_field": "email_id"},
Rushabh Mehtac78b3112016-03-30 12:29:48 +0530251]
252
Suraj Shettyf1ffdb32019-06-07 12:48:13 +0530253sounds = [
254 {"name": "incoming-call", "src": "/assets/erpnext/sounds/incoming-call.mp3", "volume": 0.2},
255 {"name": "call-disconnect", "src": "/assets/erpnext/sounds/call-disconnect.mp3", "volume": 0.2},
256]
257
Rucha Mahabal85b18e22022-06-10 16:26:07 +0530258has_upload_permission = {
Rucha Mahabal3fe2ef62022-06-15 12:43:45 +0530259 "Employee": "erpnext.setup.doctype.employee.employee.has_upload_permission"
Rucha Mahabal85b18e22022-06-10 16:26:07 +0530260}
shariquerik19893752021-03-26 16:34:22 +0530261
Anand Doshif9fc04c2015-02-23 22:14:12 +0530262has_website_permission = {
263 "Sales Order": "erpnext.controllers.website_list_for_contact.has_website_permission",
Makarand Bauskar9306aff2017-07-21 15:19:47 +0530264 "Quotation": "erpnext.controllers.website_list_for_contact.has_website_permission",
Anand Doshif9fc04c2015-02-23 22:14:12 +0530265 "Sales Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission",
Rohit Waghchaure21499e82016-09-21 16:49:58 +0530266 "Supplier Quotation": "erpnext.controllers.website_list_for_contact.has_website_permission",
Faris Ansari38ac7f72019-10-09 11:41:33 +0530267 "Purchase Order": "erpnext.controllers.website_list_for_contact.has_website_permission",
268 "Purchase Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission",
Doridel Cahanap2b14d6a2018-11-13 14:37:16 +0800269 "Material Request": "erpnext.controllers.website_list_for_contact.has_website_permission",
Rushabh Mehtaa33d4682015-06-01 17:15:42 +0530270 "Delivery Note": "erpnext.controllers.website_list_for_contact.has_website_permission",
Vishal Dhayagudeedb27492017-07-25 10:53:12 +0530271 "Issue": "erpnext.support.doctype.issue.issue.has_website_permission",
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530272 "Timesheet": "erpnext.controllers.website_list_for_contact.has_website_permission",
Anand Doshif9fc04c2015-02-23 22:14:12 +0530273}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530274
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530275before_tests = "erpnext.setup.utils.before_tests"
276
Rushabh Mehta308e6ea2015-03-24 17:34:58 +0530277standard_queries = {
Jamsheerc0097ad2018-11-23 11:37:58 +0530278 "Customer": "erpnext.selling.doctype.customer.customer.get_customer_list",
Rushabh Mehta308e6ea2015-03-24 17:34:58 +0530279}
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530280
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530281doc_events = {
Rucha Mahabalc91e03c2020-11-28 20:24:06 +0530282 "*": {
Himanshuec25d592021-06-14 19:05:52 +0530283 "validate": "erpnext.support.doctype.service_level_agreement.service_level_agreement.apply",
Rucha Mahabalc91e03c2020-11-28 20:24:06 +0530284 },
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530285 "Stock Entry": {
Nabin Hait4acd4312014-11-04 15:32:31 +0530286 "on_submit": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530287 "on_cancel": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty",
Anand Doshi648062d2014-05-05 16:46:14 +0530288 },
289 "User": {
KanchanChauhan1dc26b12017-06-13 15:26:35 +0530290 "after_insert": "frappe.contacts.doctype.contact.contact.update_contact",
Rucha Mahabal3fe2ef62022-06-15 12:43:45 +0530291 "validate": "erpnext.setup.doctype.employee.employee.validate_employee_role",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530292 "on_update": [
Rucha Mahabal3fe2ef62022-06-15 12:43:45 +0530293 "erpnext.setup.doctype.employee.employee.update_user_permissions",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530294 "erpnext.portal.utils.set_default_role",
295 ],
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530296 },
Himanshuec25d592021-06-14 19:05:52 +0530297 "Communication": {
Ganga Manojf4fc1382021-07-14 11:43:10 +0530298 "on_update": [
Saqib Ansaric1d88772021-12-06 14:34:59 +0530299 "erpnext.support.doctype.service_level_agreement.service_level_agreement.on_communication_update",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530300 "erpnext.support.doctype.issue.issue.set_first_response_time",
Nabin Haitf904ac52022-06-10 11:15:22 +0530301 ],
302 "after_insert": "erpnext.crm.utils.link_communications_with_prospect",
303 },
304 "Event": {
305 "after_insert": "erpnext.crm.utils.link_events_with_prospect",
Himanshuec25d592021-06-14 19:05:52 +0530306 },
marination45617ae2021-08-19 17:40:00 +0530307 "Sales Taxes and Charges Template": {
marinationeef9cf12021-02-16 18:45:36 +0530308 "on_update": "erpnext.e_commerce.doctype.e_commerce_settings.e_commerce_settings.validate_cart_settings"
Saurabhe4e89542016-07-21 20:26:46 +0530309 },
Charles-Henri Decultotb8c088e2018-02-21 06:37:33 +0100310 "Sales Invoice": {
vishdhad3ec1c12020-03-24 11:31:41 +0530311 "on_submit": [
312 "erpnext.regional.create_transaction_log",
313 "erpnext.regional.italy.utils.sales_invoice_on_submit",
vishdhad3ec1c12020-03-24 11:31:41 +0530314 ],
Sankara Subramanian Va06d2402023-02-21 22:52:20 +0530315 "on_cancel": ["erpnext.regional.italy.utils.sales_invoice_on_cancel"],
Deepesh Garg43820402021-11-29 18:25:47 +0530316 "on_trash": "erpnext.regional.check_deletion_permission",
Charles-Henri Decultotb8c088e2018-02-21 06:37:33 +0100317 },
Deepesh Garg24f9a802020-06-03 10:59:37 +0530318 "Purchase Invoice": {
hasnain28087b7a8e12020-09-09 20:54:30 +0530319 "validate": [
hasnain28087b7a8e12020-09-09 20:54:30 +0530320 "erpnext.regional.united_arab_emirates.utils.update_grand_total_for_rcm",
Deepesh Garg55fe85d2021-05-14 12:17:41 +0530321 "erpnext.regional.united_arab_emirates.utils.validate_returns",
Deepesh Garg55fe85d2021-05-14 12:17:41 +0530322 ]
Deepesh Garg24f9a802020-06-03 10:59:37 +0530323 },
Saurabhe4e89542016-07-21 20:26:46 +0530324 "Payment Entry": {
Ankush Menat494bd9e2022-03-28 18:52:46 +0530325 "on_submit": [
326 "erpnext.regional.create_transaction_log",
327 "erpnext.accounts.doctype.payment_request.payment_request.update_payment_req_status",
328 "erpnext.accounts.doctype.dunning.dunning.resolve_dunning",
329 ],
330 "on_trash": "erpnext.regional.check_deletion_permission",
Rushabh Mehtab3c8f442017-06-21 17:22:38 +0530331 },
Ankush Menat494bd9e2022-03-28 18:52:46 +0530332 "Address": {
333 "validate": [
Ankush Menat494bd9e2022-03-28 18:52:46 +0530334 "erpnext.regional.italy.utils.set_state_code",
Rucha Mahabal212eb4b2021-08-30 13:10:18 +0530335 ],
Nabin Hait619c42b2018-01-10 17:48:03 +0530336 },
Suraj Shettyd4edd282019-08-09 19:23:04 +0530337 "Contact": {
338 "on_trash": "erpnext.support.doctype.issue.issue.update_issue",
leela3234df52021-01-12 23:31:40 +0530339 "after_insert": "erpnext.telephony.doctype.call_log.call_log.link_existing_conversations",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530340 "validate": ["erpnext.crm.utils.update_lead_phone_numbers"],
Suraj Shettyd4edd282019-08-09 19:23:04 +0530341 },
Rucha Mahabal9e35bff2019-07-12 13:56:36 +0530342 "Email Unsubscribe": {
343 "after_insert": "erpnext.crm.doctype.email_campaign.email_campaign.unsubscribe_recipient"
vishdhad3ec1c12020-03-24 11:31:41 +0530344 },
Subin Tom798b4642021-09-03 12:30:57 +0530345 "Integration Request": {
346 "validate": "erpnext.accounts.doctype.payment_request.payment_request.validate_payment"
Ankush Menat494bd9e2022-03-28 18:52:46 +0530347 },
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530348}
349
vishaldcef7982020-01-13 12:59:52 +0530350# On cancel event Payment Entry will be exempted and all linked submittable doctype will get cancelled.
351# to maintain data integrity we exempted payment entry. it will un-link when sales invoice get cancelled.
352# if payment entry not in auto cancel exempted doctypes it will cancel payment entry.
Ankush Menat494bd9e2022-03-28 18:52:46 +0530353auto_cancel_exempted_doctypes = [
Rucha Mahabal4887b692020-10-23 20:33:30 +0530354 "Payment Entry",
vishaldcef7982020-01-13 12:59:52 +0530355]
vishal70148a62019-12-02 17:37:46 +0530356
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530357scheduler_events = {
marination06ee0ea2020-09-07 18:49:06 +0530358 "cron": {
Rohit Waghchaure2f157fa2023-03-06 12:02:35 +0530359 "0/15 * * * *": [
marinationab2d95a2022-05-23 13:00:00 +0530360 "erpnext.manufacturing.doctype.bom_update_log.bom_update_log.resume_bom_cost_update_jobs",
361 ],
marination06ee0ea2020-09-07 18:49:06 +0530362 "0/30 * * * *": [
Gavin D'souza71ac3992020-09-10 13:57:44 +0530363 "erpnext.utilities.doctype.video.video.update_youtube_data",
marinationab2d95a2022-05-23 13:00:00 +0530364 ],
Ankush Menat5d736972022-06-28 12:22:17 +0530365 # Hourly but offset by 30 minutes
366 "30 * * * *": [
367 "erpnext.accounts.doctype.gl_entry.gl_entry.rename_gle_sle_docs",
368 ],
369 # Daily but offset by 45 minutes
370 "45 0 * * *": [
371 "erpnext.stock.reorder_item.reorder_item",
372 ],
marination06ee0ea2020-09-07 18:49:06 +0530373 },
Rohit Waghchaure425dff92019-01-17 12:49:45 +0530374 "all": [
Rucha Mahabal5100e112020-02-24 22:08:45 +0530375 "erpnext.projects.doctype.project.project.project_status_update_reminder",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530376 "erpnext.crm.doctype.social_media_post.social_media_post.process_scheduled_social_media_posts",
Rohit Waghchaure425dff92019-01-17 12:49:45 +0530377 ],
Nabin Hait75807232015-07-02 14:41:27 +0530378 "hourly": [
Nabin Hait34c551d2019-07-03 10:34:31 +0530379 "erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.automatic_synchronization",
Rohit Waghchaure425dff92019-01-17 12:49:45 +0530380 "erpnext.projects.doctype.project.project.hourly_reminder",
Himanshu Warekar6e6148b2019-05-10 23:49:42 +0530381 "erpnext.projects.doctype.project.project.collect_project_status",
Rohit Waghchaureb103b242021-05-27 17:05:36 +0530382 ],
383 "hourly_long": [
Deepesh Garg82a2f312022-09-27 22:12:32 +0530384 "erpnext.accounts.doctype.subscription.subscription.process_all",
Mohammed Yusuf Shaikha3e69cf2022-02-08 01:00:37 +0530385 "erpnext.stock.doctype.repost_item_valuation.repost_item_valuation.repost_entries",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530386 "erpnext.bulk_transaction.doctype.bulk_transaction_log.bulk_transaction_log.retry_failing_transaction",
Nabin Hait75807232015-07-02 14:41:27 +0530387 ],
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530388 "daily": [
Nabin Hait606af962014-12-15 11:57:03 +0530389 "erpnext.support.doctype.issue.issue.auto_close_tickets",
mbauskare1e25a02017-02-16 19:36:59 +0530390 "erpnext.crm.doctype.opportunity.opportunity.auto_close_opportunity",
Rohit Waghchaure2f1db572016-11-08 12:39:33 +0530391 "erpnext.controllers.accounts_controller.update_invoice_status",
Rushabh Mehta5bceebc2015-01-23 15:22:13 +0530392 "erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year",
Nabin Hait4fdb0522016-03-09 12:40:56 +0530393 "erpnext.projects.doctype.task.task.set_tasks_as_overdue",
Kanchan Chauhane58a41a2017-10-17 15:17:24 +0530394 "erpnext.assets.doctype.asset.depreciation.post_depreciation_entries",
Prateeksha Singhe012e242017-07-18 10:35:12 +0530395 "erpnext.stock.doctype.serial_no.serial_no.update_maintenance_status",
bcornwellmott96381da2017-07-24 10:12:30 -0700396 "erpnext.buying.doctype.supplier_scorecard.supplier_scorecard.refresh_scorecards",
Nabin Haitadbf8ad2017-07-31 20:45:36 +0530397 "erpnext.setup.doctype.company.company.cache_companies_monthly_sales_history",
Manas Solanki2f4e5ee2018-05-15 15:25:14 +0530398 "erpnext.assets.doctype.asset.asset.update_maintenance_status",
Rohan Bansalbf0f0aa2018-05-23 15:06:45 +0530399 "erpnext.assets.doctype.asset.asset.make_post_gl_entry",
Himanshu Mishra7aabef22018-06-28 23:43:23 +0530400 "erpnext.crm.doctype.contract.contract.update_status_for_contracts",
Himanshu0209ef02018-12-25 17:42:31 +0530401 "erpnext.projects.doctype.project.project.update_project_sales_billing",
Sagar Vora4d1a9b12019-01-22 15:56:39 +0530402 "erpnext.projects.doctype.project.project.send_project_status_email_to_users",
Himanshuf3e52132019-03-19 16:47:56 +0530403 "erpnext.quality_management.doctype.quality_review.quality_review.review",
Himanshu Warekarcf37e402019-05-07 10:27:01 +0530404 "erpnext.support.doctype.service_level_agreement.service_level_agreement.check_agreement_status",
Rucha Mahabalb54459e2019-07-22 03:23:40 +0530405 "erpnext.crm.doctype.email_campaign.email_campaign.send_email_to_leads_or_contacts",
0Pranav53b65ab2019-11-15 16:42:32 +0530406 "erpnext.crm.doctype.email_campaign.email_campaign.set_email_campaign_status",
marination81798042020-04-14 23:05:11 +0530407 "erpnext.selling.doctype.quotation.quotation.set_expired_status",
Abhishek Balamee5b9c72020-08-11 16:23:47 +0530408 "erpnext.buying.doctype.supplier_quotation.supplier_quotation.set_expired_status",
Rucha Mahabalf1cca592021-01-21 16:36:15 +0530409 "erpnext.accounts.doctype.process_statement_of_accounts.process_statement_of_accounts.send_auto_email",
KanchanChauhan73bd3cb2018-09-05 11:01:35 +0530410 ],
411 "daily_long": [
Gavin D'souzad38f5372019-10-30 14:43:58 +0530412 "erpnext.setup.doctype.email_digest.email_digest.send",
marination4283a132022-03-16 19:45:03 +0530413 "erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.auto_update_latest_price_in_all_boms",
Afshan5d66a2b2021-03-12 15:51:34 +0530414 "erpnext.loan_management.doctype.process_loan_security_shortfall.process_loan_security_shortfall.create_process_loan_security_shortfall",
415 "erpnext.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual.process_loan_interest_accrual_for_term_loans",
Nabin Hait925b9d92022-06-27 21:58:19 +0530416 "erpnext.crm.utils.open_leads_opportunities_based_on_todays_event",
KanchanChauhan73bd3cb2018-09-05 11:01:35 +0530417 ],
Nabin Haitb9b2a062019-05-01 12:49:44 +0530418 "monthly_long": [
Deepesh Gargde03d2c2020-06-01 11:30:34 +0530419 "erpnext.accounts.deferred_revenue.process_deferred_accounting",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530420 "erpnext.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual.process_loan_interest_accrual_for_demand_loans",
421 ],
Rushabh Mehta4ceb20e2014-05-02 12:14:03 +0530422}
Anand Doshi7f41ff22014-06-26 12:02:55 +0530423
Faris Ansari2c5b3e82017-07-13 18:37:18 +0530424email_brand_image = "assets/erpnext/images/erpnext-logo.jpg"
425
Faris Ansari40d3ad22017-07-31 16:16:22 +0530426default_mail_footer = """
427 <span>
428 Sent via
429 <a class="text-muted" href="https://erpnext.com?source=via_email_footer" target="_blank">
430 ERPNext
431 </a>
432 </span>
433"""
Anand Doshic82331b2015-02-12 18:58:28 +0530434
435get_translated_dict = {
Anand Doshic82331b2015-02-12 18:58:28 +0530436 ("doctype", "Global Defaults"): "frappe.geo.country_info.get_translated_dict"
437}
Rushabh Mehtafe027b32016-03-28 13:21:43 +0530438
439bot_parsers = [
Ankush Menat494bd9e2022-03-28 18:52:46 +0530440 "erpnext.utilities.bot.FindItemBot",
Rushabh Mehta0c76f212016-04-01 11:53:50 +0530441]
Anand Doshif576f3b2016-06-25 19:51:48 +0530442
Ankush Menat494bd9e2022-03-28 18:52:46 +0530443get_site_info = "erpnext.utilities.get_site_info"
Saurabh94c666a2016-11-08 20:35:50 +0530444
Saurabh0d47d512017-03-14 14:46:05 +0530445payment_gateway_enabled = "erpnext.accounts.utils.create_payment_gateway_account"
Rushabh Mehta7231f292017-07-13 15:00:56 +0530446
Himanshub84333f2020-04-14 13:02:03 +0530447communication_doctypes = ["Customer", "Supplier"]
448
Rucha Mahabal1ff0e452022-06-23 16:17:34 +0530449advance_payment_doctypes = ["Sales Order", "Purchase Order"]
450
451invoice_doctypes = ["Sales Invoice", "Purchase Invoice"]
452
453period_closing_doctypes = [
454 "Sales Invoice",
455 "Purchase Invoice",
456 "Journal Entry",
457 "Bank Clearance",
458 "Asset",
459 "Stock Entry",
460]
461
Rucha Mahabal466bf992022-07-01 19:01:17 +0530462bank_reconciliation_doctypes = [
463 "Payment Entry",
464 "Journal Entry",
465 "Purchase Invoice",
466 "Sales Invoice",
467 "Loan Repayment",
468 "Loan Disbursement",
469]
470
Ankush Menat494bd9e2022-03-28 18:52:46 +0530471accounting_dimension_doctypes = [
472 "GL Entry",
ruthra kumar7b1cb672022-05-16 14:32:58 +0530473 "Payment Ledger Entry",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530474 "Sales Invoice",
475 "Purchase Invoice",
476 "Payment Entry",
477 "Asset",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530478 "Stock Entry",
479 "Budget",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530480 "Delivery Note",
481 "Sales Invoice Item",
482 "Purchase Invoice Item",
483 "Purchase Order Item",
484 "Journal Entry Account",
485 "Material Request Item",
486 "Delivery Note Item",
487 "Purchase Receipt Item",
488 "Stock Entry Detail",
489 "Payment Entry Deduction",
490 "Sales Taxes and Charges",
491 "Purchase Taxes and Charges",
492 "Shipping Rule",
493 "Landed Cost Item",
494 "Asset Value Adjustment",
ruthra kumar452584c2022-07-28 07:11:16 +0530495 "Asset Repair",
Nabin Haitfe891aa2022-09-30 15:55:41 +0530496 "Asset Capitalization",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530497 "Loyalty Program",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530498 "Stock Reconciliation",
Ankush Menat494bd9e2022-03-28 18:52:46 +0530499 "POS Profile",
500 "Opening Invoice Creation Tool",
501 "Opening Invoice Creation Tool Item",
502 "Subscription",
503 "Subscription Plan",
504 "POS Invoice",
505 "POS Invoice Item",
Deepesh Garg82a06352022-04-26 14:01:13 +0530506 "Purchase Order",
507 "Purchase Receipt",
508 "Sales Order",
Sagar Sharma8704ca72022-08-18 10:58:33 +0530509 "Subcontracting Order",
510 "Subcontracting Order Item",
511 "Subcontracting Receipt",
512 "Subcontracting Receipt Item",
Deepesh Garg0157fa12023-03-10 13:02:01 +0530513 "Accounts Closing Balance",
Glen Whitneydea6a902020-11-17 22:16:13 +0000514]
515
Rucha Mahabal466bf992022-07-01 19:01:17 +0530516# get matching queries for Bank Reconciliation
517get_matching_queries = (
518 "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_matching_queries"
519)
520
Rushabh Mehta7231f292017-07-13 15:00:56 +0530521regional_overrides = {
Ankush Menat494bd9e2022-03-28 18:52:46 +0530522 "France": {
523 "erpnext.tests.test_regional.test_method": "erpnext.regional.france.utils.test_method"
Charles-Henri Decultotb8c088e2018-02-21 06:37:33 +0100524 },
Ankush Menat494bd9e2022-03-28 18:52:46 +0530525 "United Arab Emirates": {
526 "erpnext.controllers.taxes_and_totals.update_itemised_tax_data": "erpnext.regional.united_arab_emirates.utils.update_itemised_tax_data",
527 "erpnext.accounts.doctype.purchase_invoice.purchase_invoice.make_regional_gl_entries": "erpnext.regional.united_arab_emirates.utils.make_regional_gl_entries",
rohitwaghchaured4526682017-12-28 14:20:13 +0530528 },
Ankush Menat494bd9e2022-03-28 18:52:46 +0530529 "Saudi Arabia": {
530 "erpnext.controllers.taxes_and_totals.update_itemised_tax_data": "erpnext.regional.united_arab_emirates.utils.update_itemised_tax_data"
scmmishra14d70ce2019-03-14 12:31:25 +0530531 },
Ankush Menat494bd9e2022-03-28 18:52:46 +0530532 "Italy": {
533 "erpnext.controllers.taxes_and_totals.update_itemised_tax_data": "erpnext.regional.italy.utils.update_itemised_tax_data",
534 "erpnext.controllers.accounts_controller.validate_regional": "erpnext.regional.italy.utils.sales_invoice_validate",
535 },
Manas Solanki2f4e5ee2018-05-15 15:25:14 +0530536}
Mangesh-Khairnar2ffa87e2019-03-20 13:25:48 +0530537user_privacy_documents = [
538 {
Ankush Menat494bd9e2022-03-28 18:52:46 +0530539 "doctype": "Lead",
540 "match_field": "email_id",
541 "personal_fields": ["phone", "mobile_no", "fax", "website", "lead_name"],
Mangesh-Khairnar2ffa87e2019-03-20 13:25:48 +0530542 },
543 {
Ankush Menat494bd9e2022-03-28 18:52:46 +0530544 "doctype": "Opportunity",
545 "match_field": "contact_email",
546 "personal_fields": ["contact_mobile", "contact_display", "customer_name"],
547 },
John Clarkeb7339842019-04-04 23:32:25 -0600548]
Himanshu83b0b2a2019-09-27 00:59:48 +0530549
Himanshu Warekar21abc3a2019-09-30 13:40:02 +0530550# ERPNext doctypes for Global Search
Himanshu Warekar23c916c2019-10-02 16:32:53 +0530551global_search_doctypes = {
552 "Default": [
553 {"doctype": "Customer", "index": 0},
554 {"doctype": "Supplier", "index": 1},
555 {"doctype": "Item", "index": 2},
556 {"doctype": "Warehouse", "index": 3},
557 {"doctype": "Account", "index": 4},
558 {"doctype": "Employee", "index": 5},
559 {"doctype": "BOM", "index": 6},
560 {"doctype": "Sales Invoice", "index": 7},
561 {"doctype": "Sales Order", "index": 8},
562 {"doctype": "Quotation", "index": 9},
563 {"doctype": "Work Order", "index": 10},
Walstan Baptista0baebbd2020-12-08 09:43:29 +0530564 {"doctype": "Purchase Order", "index": 11},
565 {"doctype": "Purchase Receipt", "index": 12},
566 {"doctype": "Purchase Invoice", "index": 13},
567 {"doctype": "Delivery Note", "index": 14},
568 {"doctype": "Stock Entry", "index": 15},
569 {"doctype": "Material Request", "index": 16},
570 {"doctype": "Delivery Trip", "index": 17},
571 {"doctype": "Pick List", "index": 18},
Walstan Baptista0baebbd2020-12-08 09:43:29 +0530572 {"doctype": "Payment Entry", "index": 22},
573 {"doctype": "Lead", "index": 23},
574 {"doctype": "Opportunity", "index": 24},
575 {"doctype": "Item Price", "index": 25},
576 {"doctype": "Purchase Taxes and Charges Template", "index": 26},
577 {"doctype": "Sales Taxes and Charges", "index": 27},
578 {"doctype": "Asset", "index": 28},
579 {"doctype": "Project", "index": 29},
580 {"doctype": "Task", "index": 30},
581 {"doctype": "Timesheet", "index": 31},
582 {"doctype": "Issue", "index": 32},
583 {"doctype": "Serial No", "index": 33},
584 {"doctype": "Batch", "index": 34},
585 {"doctype": "Branch", "index": 35},
586 {"doctype": "Department", "index": 36},
Walstan Baptista0baebbd2020-12-08 09:43:29 +0530587 {"doctype": "Designation", "index": 38},
Walstan Baptista0baebbd2020-12-08 09:43:29 +0530588 {"doctype": "Loan", "index": 44},
589 {"doctype": "Maintenance Schedule", "index": 45},
590 {"doctype": "Maintenance Visit", "index": 46},
591 {"doctype": "Warranty Claim", "index": 47},
Himanshu Warekar23c916c2019-10-02 16:32:53 +0530592 ],
Faris Ansari22bcad92020-10-16 15:28:12 +0530593}
leela3234df52021-01-12 23:31:40 +0530594
595additional_timeline_content = {
Ankush Menat494bd9e2022-03-28 18:52:46 +0530596 "*": ["erpnext.telephony.doctype.call_log.call_log.get_linked_call_logs"]
leela3234df52021-01-12 23:31:40 +0530597}