fix: add default hold statuses in fixtures and patch
This commit is contained in:
parent
8d39928418
commit
25ef6a9638
@ -4,6 +4,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
from erpnext.setup.install import add_sla_hold_statuses_to_support_settings
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
# add holiday list and employee group fields in SLA
|
# add holiday list and employee group fields in SLA
|
||||||
@ -78,6 +79,9 @@ def execute():
|
|||||||
|
|
||||||
frappe.delete_doc('DocType', 'Service Level')
|
frappe.delete_doc('DocType', 'Service Level')
|
||||||
|
|
||||||
|
# add SLA hold statuses to Support Settings
|
||||||
|
add_sla_hold_statuses_to_support_settings()
|
||||||
|
|
||||||
|
|
||||||
def convert_to_seconds(value, unit):
|
def convert_to_seconds(value, unit):
|
||||||
seconds = 0
|
seconds = 0
|
||||||
|
|||||||
@ -25,6 +25,7 @@ def after_install():
|
|||||||
create_default_success_action()
|
create_default_success_action()
|
||||||
create_default_energy_point_rules()
|
create_default_energy_point_rules()
|
||||||
add_company_to_session_defaults()
|
add_company_to_session_defaults()
|
||||||
|
add_sla_hold_statuses_to_support_settings()
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
|
|
||||||
|
|
||||||
@ -105,3 +106,13 @@ def add_company_to_session_defaults():
|
|||||||
"ref_doctype": "Company"
|
"ref_doctype": "Company"
|
||||||
})
|
})
|
||||||
settings.save()
|
settings.save()
|
||||||
|
|
||||||
|
def add_sla_hold_statuses_to_support_settings():
|
||||||
|
settings = frappe.get_single("Support Settings")
|
||||||
|
settings.append("pause_sla_on_status", {
|
||||||
|
"status": "Replied"
|
||||||
|
})
|
||||||
|
settings.append("pause_sla_on_status", {
|
||||||
|
"status": "Hold"
|
||||||
|
})
|
||||||
|
settings.save()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user