123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- # -*- coding: utf-8 -*-
- from __future__ import unicode_literals
- from . import __version__ as app_version
- app_name = "gtl_custom"
- app_title = "GTL Customisation"
- app_publisher = "Fafadia Tech"
- app_description = "Customisations done for GTL"
- app_icon = "octicon octicon-file-directory"
- app_color = "grey"
- app_email = "sidharth@fafadiatech.com"
- app_license = "MIT"
- from erpnext.controllers.accounts_controller import AccountsController
- def custom_validate_qty_is_not_zero(self):
- pass
- AccountsController.validate_qty_is_not_zero = custom_validate_qty_is_not_zero
- # Includes in <head>
- # ------------------
- # include js, css files in header of desk.html
- # app_include_css = "/assets/gtl_custom/css/gtl_custom.css"
- # app_include_js = "/assets/gtl_custom/js/gtl_custom.js"
- # include js, css files in header of web template
- # web_include_css = "/assets/gtl_custom/css/gtl_custom.css"
- # web_include_js = "/assets/gtl_custom/js/gtl_custom.js"
- # include js in page
- # page_js = {"page" : "public/js/file.js"}
- # include js in doctype views
- # doctype_js = {"doctype" : "public/js/doctype.js"}
- # doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
- doctype_list_js = {"Purchase Order":"public/js/purchase_order_list.js"}
- # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
- # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
- # Home Pages
- # ----------
- # application home page (will override Website Settings)
- # home_page = "login"
- # website user home page (by Role)
- # role_home_page = {
- # "Role": "home_page"
- # }
- # Website user home page (by function)
- # get_website_user_home_page = "gtl_custom.utils.get_home_page"
- # Generators
- # ----------
- # automatically create page for each record of this doctype
- # website_generators = ["Web Page"]
- # Installation
- # ------------
- # before_install = "gtl_custom.install.before_install"
- # after_install = "gtl_custom.install.after_install"
- # Desk Notifications
- # ------------------
- # See frappe.core.notifications.get_notification_config
- # notification_config = "gtl_custom.notifications.get_notification_config"
- # Permissions
- # -----------
- # Permissions evaluated in scripted ways
- # permission_query_conditions = {
- # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
- # }
- #
- # has_permission = {
- # "Event": "frappe.desk.doctype.event.event.has_permission",
- # }
- # Document Events
- # ---------------
- # Hook on document methods and events
- # doc_events = {
- # "*": {
- # "on_update": "method",
- # "on_cancel": "method",
- # "on_trash": "method"
- # }
- # }
- doc_events = {
- "Request for Quotation": {
- "validate": "gtl_custom.validations.rfq_validations"
- },
- "Quotation": {
- "validate": "gtl_custom.validations.quote_validations",
- "on_update": "gtl_custom.validations.quote_update",
- },
- "Purchase Order": {
- "validate": "gtl_custom.validations.purchase_order_validation"
- },
- "ToDo": {
- "validate": "gtl_custom.validations.todo_validation"
- }
- }
- # Scheduled Tasks
- # ---------------
- # scheduler_events = {
- # "all": [
- # "gtl_custom.tasks.all"
- # ],
- # "daily": [
- # "gtl_custom.tasks.daily"
- # ],
- # "hourly": [
- # "gtl_custom.tasks.hourly"
- # ],
- # "weekly": [
- # "gtl_custom.tasks.weekly"
- # ]
- # "monthly": [
- # "gtl_custom.tasks.monthly"
- # ]
- # }
- # Testing
- # -------
- # before_tests = "gtl_custom.install.before_tests"
- # Overriding Methods
- # ------------------------------
- #
- # override_whitelisted_methods = {
- # # "frappe.desk.doctype.event.event.get_events": "gtl_custom.event.get_events"
- # "erpnext.controllers.accounts_controller.AccountsController.validate_qty_is_not_zero": "gtl_custom.api.custom_validate_qty_is_not_zero"
- # }
- #
- # each overriding function accepts a `data` argument;
- # generated from the base implementation of the doctype dashboard,
- # along with any modifications made in other Frappe apps
- # override_doctype_dashboards = {
- # "Task": "gtl_custom.task.get_dashboard_data"
- # }
|