brotherton-erpnext/erpnext/hooks.py

179 lines
6.4 KiB
Python
Raw Normal View History

from __future__ import unicode_literals
from frappe import _
2014-05-02 06:44:03 +00:00
app_name = "erpnext"
app_title = "ERPNext"
2015-07-22 09:37:25 +00:00
app_publisher = "Frappe Technologies Pvt. Ltd."
2015-11-18 11:18:19 +00:00
app_description = """ERP made simple"""
2014-05-02 06:44:03 +00:00
app_icon = "icon-th"
app_color = "#e74c3c"
2016-05-11 07:13:39 +00:00
app_version = "6.27.17"
2015-11-05 11:25:10 +00:00
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"
2014-05-02 06:44:03 +00:00
2014-07-09 07:29:56 +00:00
error_report_email = "support@erpnext.com"
2014-05-02 06:44:03 +00:00
app_include_js = "assets/js/erpnext.min.js"
app_include_css = "assets/css/erpnext.css"
web_include_js = "assets/js/erpnext-web.min.js"
2015-02-24 12:20:44 +00:00
web_include_css = "assets/erpnext/css/website.css"
2014-05-02 06:44:03 +00:00
2015-11-09 11:23:11 +00:00
# setup wizard
setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_complete"
before_install = "erpnext.setup.install.check_setup_wizard_not_completed"
2014-05-02 06:44:03 +00:00
after_install = "erpnext.setup.install.after_install"
boot_session = "erpnext.startup.boot.boot_session"
notification_config = "erpnext.startup.notifications.get_notification_config"
2014-10-21 10:46:30 +00:00
on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
2015-02-23 16:44:12 +00:00
remember_selected = ['Company', 'Cost Center', 'Project']
2015-02-23 16:44:12 +00:00
# website
update_website_context = "erpnext.shopping_cart.utils.update_website_context"
my_account_context = "erpnext.shopping_cart.utils.update_my_account_context"
2015-07-08 07:09:27 +00:00
2015-04-02 16:30:34 +00:00
email_append_to = ["Job Applicant", "Opportunity", "Issue"]
2015-02-23 16:44:12 +00:00
2015-10-06 09:51:23 +00:00
calendars = ["Task", "Production Order", "Time Log", "Leave Application", "Sales Order", "Holiday List"]
2015-07-08 07:09:27 +00:00
2016-03-01 06:03:49 +00:00
fixtures = ["Web Form"]
website_generators = ["Item Group", "Item", "Sales Partner", "Job Opening"]
2015-07-08 07:09:27 +00:00
2015-04-16 07:11:42 +00:00
website_context = {
2015-04-16 09:39:42 +00:00
"favicon": "/assets/erpnext/images/favicon.png",
"splash_image": "/assets/erpnext/images/splash.png"
2015-04-16 07:11:42 +00:00
}
2015-02-23 16:44:12 +00:00
website_route_rules = [
{"from_route": "/orders", "to_route": "Sales Order"},
{"from_route": "/orders/<path:name>", "to_route": "order",
"defaults": {
"doctype": "Sales Order",
"parents": [{"title": _("Orders"), "name": "orders"}]
}
},
2015-02-23 16:44:12 +00:00
{"from_route": "/invoices", "to_route": "Sales Invoice"},
{"from_route": "/invoices/<path:name>", "to_route": "order",
"defaults": {
"doctype": "Sales Invoice",
"parents": [{"title": _("Invoices"), "name": "invoices"}]
}
},
2015-02-23 16:44:12 +00:00
{"from_route": "/shipments", "to_route": "Delivery Note"},
{"from_route": "/shipments/<path:name>", "to_route": "order",
"defaults": {
2015-11-26 12:52:03 +00:00
"doctype": "Delivery Note",
"parents": [{"title": _("Shipments"), "name": "shipments"}]
}
2016-02-19 11:57:23 +00:00
},
2016-03-03 08:30:35 +00:00
{"from_route": "/rfq", "to_route": "Request for Quotation"},
{"from_route": "/rfq/<path:name>", "to_route": "rfq",
"defaults": {
"doctype": "Request for Quotation",
"parents": [{"title": _("Request for Quotation"), "name": "rfq"}]
}
},
2016-02-19 11:57:23 +00:00
{"from_route": "/jobs", "to_route": "Job Opening"},
2015-02-23 16:44:12 +00:00
]
portal_menu_items = [
2016-04-01 06:23:50 +00:00
{"title": _("Projects"), "route": "/project", "reference_doctype": "Project"},
{"title": _("Request for Quotations"), "route": "/rfq", "reference_doctype": "Request for Quotation"},
{"title": _("Orders"), "route": "/orders", "reference_doctype": "Sales Order"},
{"title": _("Invoices"), "route": "/invoices", "reference_doctype": "Sales Invoice"},
{"title": _("Shipments"), "route": "/shipments", "reference_doctype": "Delivery Note"},
{"title": _("Issues"), "route": "/issues", "reference_doctype": "Issue"},
{"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"}
]
2015-02-23 16:44:12 +00:00
has_website_permission = {
"Sales Order": "erpnext.controllers.website_list_for_contact.has_website_permission",
"Sales Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission",
2015-06-01 11:45:42 +00:00
"Delivery Note": "erpnext.controllers.website_list_for_contact.has_website_permission",
"Issue": "erpnext.support.doctype.issue.issue.has_website_permission",
"Address": "erpnext.utilities.doctype.address.address.has_website_permission"
2015-02-23 16:44:12 +00:00
}
2014-10-21 10:46:30 +00:00
permission_query_conditions = {
"Contact": "erpnext.utilities.address_and_contact.get_permission_query_conditions_for_contact",
"Address": "erpnext.utilities.address_and_contact.get_permission_query_conditions_for_address"
}
has_permission = {
"Contact": "erpnext.utilities.address_and_contact.has_permission",
"Address": "erpnext.utilities.address_and_contact.has_permission"
}
2014-05-02 06:44:03 +00:00
dump_report_map = "erpnext.startup.report_data_map.data_map"
before_tests = "erpnext.setup.utils.before_tests"
2015-03-24 12:04:58 +00:00
standard_queries = {
"Customer": "erpnext.selling.doctype.customer.customer.get_customer_list"
}
2014-05-02 06:44:03 +00:00
doc_events = {
"Stock Entry": {
2014-11-04 10:02:31 +00:00
"on_submit": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty",
"on_cancel": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty"
2014-05-05 11:16:14 +00:00
},
"User": {
2014-05-28 13:19:13 +00:00
"validate": "erpnext.hr.doctype.employee.employee.validate_employee_role",
2016-03-30 11:45:33 +00:00
"on_update": "erpnext.hr.doctype.employee.employee.update_user_permissions",
"on_update": "erpnext.utilities.doctype.contact.contact.update_contact"
2014-10-21 10:46:30 +00:00
},
("Sales Taxes and Charges Template", 'Price List'): {
2014-10-21 10:46:30 +00:00
"on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings"
},
2015-12-08 07:04:01 +00:00
"Address": {
"validate": "erpnext.shopping_cart.cart.set_customer_in_address"
},
# bubble transaction notification on master
2016-04-11 12:04:25 +00:00
('Opportunity', 'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice',
'Supplier Quotation', 'Purchase Order', 'Purchase Receipt',
'Purchase Invoice', 'Project', 'Issue'): {
2016-04-11 06:04:59 +00:00
'on_change': 'erpnext.accounts.party_status.notify_status'
2016-04-22 13:23:21 +00:00
},
"Website Settings": {
"validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products"
}
2014-05-02 06:44:03 +00:00
}
scheduler_events = {
"hourly": [
"erpnext.controllers.recurring_document.create_recurring_documents"
],
2014-05-02 06:44:03 +00:00
"daily": [
"erpnext.stock.reorder_item.reorder_item",
2014-05-02 06:44:03 +00:00
"erpnext.setup.doctype.email_digest.email_digest.send",
2014-12-15 06:27:03 +00:00
"erpnext.support.doctype.issue.issue.auto_close_tickets",
2015-01-23 09:52:13 +00:00
"erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year",
"erpnext.hr.doctype.employee.employee.send_birthday_reminders",
2016-03-09 07:10:56 +00:00
"erpnext.projects.doctype.task.task.set_tasks_as_overdue",
"erpnext.accounts.doctype.asset.depreciation.post_depreciation_entries"
2014-05-02 06:44:03 +00:00
]
}
2014-06-26 06:32:55 +00:00
default_mail_footer = """<div style="text-align: center;">
2015-05-26 06:43:30 +00:00
<a href="https://erpnext.com?source=via_email_footer" target="_blank" style="color: #8d99a6;">
Sent via ERPNext
</a>
</div>"""
2015-02-12 13:28:28 +00:00
get_translated_dict = {
("doctype", "Global Defaults"): "frappe.geo.country_info.get_translated_dict"
}
2016-03-28 07:51:43 +00:00
bot_parsers = [
'erpnext.utilities.bot.FindItemBot',
2016-04-01 06:23:50 +00:00
]