hooks.py~ 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from . import __version__ as app_version
  4. app_name = "gtl_custom"
  5. app_title = "GTL Customisation"
  6. app_publisher = "Fafadia Tech"
  7. app_description = "Customisations done for GTL"
  8. app_icon = "octicon octicon-file-directory"
  9. app_color = "grey"
  10. app_email = "sidharth@fafadiatech.com"
  11. app_license = "MIT"
  12. # Includes in <head>
  13. # ------------------
  14. # include js, css files in header of desk.html
  15. # app_include_css = "/assets/gtl_custom/css/gtl_custom.css"
  16. # app_include_js = "/assets/gtl_custom/js/gtl_custom.js"
  17. # include js, css files in header of web template
  18. # web_include_css = "/assets/gtl_custom/css/gtl_custom.css"
  19. # web_include_js = "/assets/gtl_custom/js/gtl_custom.js"
  20. # include js in page
  21. # page_js = {"page" : "public/js/file.js"}
  22. # include js in doctype views
  23. # doctype_js = {"doctype" : "public/js/doctype.js"}
  24. # doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
  25. # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
  26. # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
  27. # Home Pages
  28. # ----------
  29. # application home page (will override Website Settings)
  30. # home_page = "login"
  31. # website user home page (by Role)
  32. # role_home_page = {
  33. # "Role": "home_page"
  34. # }
  35. # Website user home page (by function)
  36. # get_website_user_home_page = "gtl_custom.utils.get_home_page"
  37. # Generators
  38. # ----------
  39. # automatically create page for each record of this doctype
  40. # website_generators = ["Web Page"]
  41. # Installation
  42. # ------------
  43. # before_install = "gtl_custom.install.before_install"
  44. # after_install = "gtl_custom.install.after_install"
  45. # Desk Notifications
  46. # ------------------
  47. # See frappe.core.notifications.get_notification_config
  48. # notification_config = "gtl_custom.notifications.get_notification_config"
  49. # Permissions
  50. # -----------
  51. # Permissions evaluated in scripted ways
  52. # permission_query_conditions = {
  53. # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
  54. # }
  55. #
  56. # has_permission = {
  57. # "Event": "frappe.desk.doctype.event.event.has_permission",
  58. # }
  59. # Document Events
  60. # ---------------
  61. # Hook on document methods and events
  62. # doc_events = {
  63. # "*": {
  64. # "on_update": "method",
  65. # "on_cancel": "method",
  66. # "on_trash": "method"
  67. # }
  68. # }
  69. doc_events = {
  70. "Request for Quotation": {
  71. "validate": "gtl_custom.validations.rfq_validations"
  72. },
  73. "Quotation": {
  74. "validate": "gtl_custom.validations.quote_validations",
  75. "validate": "gtl_custom.validations.quote_update"
  76. },
  77. }
  78. # Scheduled Tasks
  79. # ---------------
  80. # scheduler_events = {
  81. # "all": [
  82. # "gtl_custom.tasks.all"
  83. # ],
  84. # "daily": [
  85. # "gtl_custom.tasks.daily"
  86. # ],
  87. # "hourly": [
  88. # "gtl_custom.tasks.hourly"
  89. # ],
  90. # "weekly": [
  91. # "gtl_custom.tasks.weekly"
  92. # ]
  93. # "monthly": [
  94. # "gtl_custom.tasks.monthly"
  95. # ]
  96. # }
  97. # Testing
  98. # -------
  99. # before_tests = "gtl_custom.install.before_tests"
  100. # Overriding Methods
  101. # ------------------------------
  102. #
  103. # override_whitelisted_methods = {
  104. # "frappe.desk.doctype.event.event.get_events": "gtl_custom.event.get_events"
  105. # }
  106. #
  107. # each overriding function accepts a `data` argument;
  108. # generated from the base implementation of the doctype dashboard,
  109. # along with any modifications made in other Frappe apps
  110. # override_doctype_dashboards = {
  111. # "Task": "gtl_custom.task.get_dashboard_data"
  112. # }