From f21247cb0f4a0ad5648316f3a19bee53b1ddee2a Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Wed, 17 Jan 2018 12:46:51 +0530 Subject: [PATCH] [PATCH] enable chat by default within system settings --- frappe/patches.txt | 1 + .../enable_chat_by_default_within_system_settings.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 frappe/patches/v10_0/enable_chat_by_default_within_system_settings.py diff --git a/frappe/patches.txt b/frappe/patches.txt index a1e79e62c8..6159035dae 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -202,3 +202,4 @@ frappe.patches.v9_1.move_feed_to_activity_log execute:frappe.delete_doc('Page', 'data-import-tool', ignore_missing=True) frappe.patches.v10_0.reload_countries_and_currencies frappe.patches.v10_0.refactor_social_login_keys +frappe.patches.v10_0.enable_chat_by_default_within_system_settings \ No newline at end of file diff --git a/frappe/patches/v10_0/enable_chat_by_default_within_system_settings.py b/frappe/patches/v10_0/enable_chat_by_default_within_system_settings.py new file mode 100644 index 0000000000..985a214e4b --- /dev/null +++ b/frappe/patches/v10_0/enable_chat_by_default_within_system_settings.py @@ -0,0 +1,11 @@ +import frappe + +def execute(): + doc = frappe.get_single('System Settings') + doc.enable_chat = 1 + + # Changes prescribed by Nabin Hait (nabin@frappe.io) + doc.flags.ignore_mandatory = True + doc.flags.ignore_permissions = True + + doc.save() \ No newline at end of file