mirror of
https://github.com/itsdave-de/msp.git
synced 2026-09-28 04:02:42 -03:00
- IT Object: git_remote_url, git_branch, git_path_on_host (visible only when type = Git Repository) - Contact custom fields: teams_user_id, is_external_contractor, contractor_for (via fixtures) - Remove x509_certificate hooks from hooks.py (moved to DocType controller) - Add Custom Field fixture export filter to hooks.py - German translations (de.csv) for all new DocTypes and fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
168 lines
3.9 KiB
Python
168 lines
3.9 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
from . import __version__ as app_version
|
|
|
|
app_name = "msp"
|
|
app_title = "MSP"
|
|
app_publisher = "itsdave GmbH"
|
|
app_description = "App for Managed Service Providers"
|
|
app_icon = "octicon octicon-rocket"
|
|
app_color = "grey"
|
|
app_email = "dev@itsdave.de"
|
|
app_license = "GPLv3"
|
|
|
|
# Includes in <head>
|
|
# ------------------
|
|
|
|
# include js, css files in header of desk.html
|
|
# app_include_css = "/assets/msp/css/msp.css"
|
|
app_include_js = "/assets/msp/js/customer_quick_entry.js"
|
|
|
|
jinja = {
|
|
"methods": [
|
|
"msp.things.get_item_price_for_label",
|
|
"msp.things.get_epc_inline",
|
|
"msp.things.get_qr_code_inline"
|
|
]
|
|
}
|
|
|
|
# include js, css files in header of web template
|
|
# web_include_css = "/assets/msp/css/msp.css"
|
|
# web_include_js = "/assets/msp/js/msp.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_tree_js = {"doctype" : "public/js/doctype_tree.js"}
|
|
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
|
|
|
|
doctype_js = {
|
|
"Location": "public/js/location.js",
|
|
"Quotation": "public/js/quotation.js",
|
|
"Purchase Receipt": "public/js/purchase_receipt.js",
|
|
"Sales Invoice": "public/js/sales_invoice.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 = "msp.utils.get_home_page"
|
|
|
|
# Generators
|
|
# ----------
|
|
|
|
# automatically create page for each record of this doctype
|
|
# website_generators = ["Web Page"]
|
|
|
|
# Installation
|
|
# ------------
|
|
|
|
# before_install = "msp.install.before_install"
|
|
# after_install = "msp.install.after_install"
|
|
|
|
# Desk Notifications
|
|
# ------------------
|
|
# See frappe.core.notifications.get_notification_config
|
|
|
|
# notification_config = "msp.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 = {
|
|
"Location": {
|
|
"before_save": "msp.hooked_methods.build_full_location_path"
|
|
},
|
|
'Service Report': {
|
|
'before_save': 'msp.tools.save_backlinks',
|
|
'on_cancel': 'msp.tools.handle_backlinks',
|
|
'on_trash': 'msp.tools.handle_backlinks'
|
|
}
|
|
}
|
|
|
|
|
|
# Scheduled Tasks
|
|
# ---------------
|
|
|
|
scheduler_events = {
|
|
"cron": {
|
|
"*/5 * * * *": [
|
|
"msp.tools.update_tickets_and_articles"
|
|
]
|
|
},
|
|
"hourly": [
|
|
"msp.msp.doctype.backupreport_instance.backupreport_instance.sync_all_instances"
|
|
]
|
|
}
|
|
|
|
# scheduler_events = {
|
|
# "all": [
|
|
# "msp.tasks.all"
|
|
# ],
|
|
# "daily": [
|
|
# "msp.tasks.daily"
|
|
# ],
|
|
# "hourly": [
|
|
# "msp.tasks.hourly"
|
|
# ],
|
|
# "weekly": [
|
|
# "msp.tasks.weekly"
|
|
# ]
|
|
# "monthly": [
|
|
# "msp.tasks.monthly"
|
|
# ]
|
|
# }
|
|
|
|
# Testing
|
|
# -------
|
|
|
|
# before_tests = "msp.install.before_tests"
|
|
|
|
# Overriding Methods
|
|
# ------------------------------
|
|
#
|
|
# override_whitelisted_methods = {
|
|
# "frappe.desk.doctype.event.event.get_events": "msp.event.get_events"
|
|
# }
|
|
#
|
|
# 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": "msp.task.get_dashboard_data"
|
|
# }
|
|
|
|
override_doctype_class = {
|
|
"Location": "msp.overrides.location.CustomLocation.CustomLocation"
|
|
}
|
|
|
|
fixtures = [
|
|
{"doctype": "Print Format", "filters": {"name": "Standard IT Landscape Documentation"}},
|
|
{"doctype": "Custom Field", "filters": {"module": "MSP"}},
|
|
]
|