diff --git a/erpnext/patches.txt b/erpnext/patches.txt index aa88b210e2e..35582cb563b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -404,4 +404,5 @@ erpnext.patches.v8_0.delete_bin_indexes erpnext.patches.v8_0.move_account_head_from_account_to_warehouse_for_inventory erpnext.patches.v8_0.change_in_words_varchar_length erpnext.patches.v8_0.create_domain_docs #16-05-2017 -erpnext.patches.v8_0.update_sales_cost_in_project \ No newline at end of file +erpnext.patches.v8_0.update_sales_cost_in_project +erpnext.patches.v8_0.save_system_settings \ No newline at end of file diff --git a/erpnext/patches/v8_0/save_system_settings.py b/erpnext/patches/v8_0/save_system_settings.py new file mode 100644 index 00000000000..d91e4c12093 --- /dev/null +++ b/erpnext/patches/v8_0/save_system_settings.py @@ -0,0 +1,15 @@ +# Copyright (c) 2017, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + """ + save system settings document + """ + + frappe.reload_doc("core", "doctype", "system_settings") + doc = frappe.get_doc("System Settings", "System Settings") + doc.flags.ignore_mandatory = True + doc.save(ignore_permissions=True)