brotherton-erpnext/erpnext/patches/v8_7/set_offline_in_pos_settings.py

13 lines
371 B
Python
Raw Normal View History

2017-08-30 13:26:26 +00:00
# Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('accounts', 'doctype', 'pos_field')
2017-08-30 13:26:26 +00:00
frappe.reload_doc('accounts', 'doctype', 'pos_settings')
doc = frappe.get_doc('POS Settings')
doc.use_pos_in_offline_mode = 1
2017-08-30 13:26:26 +00:00
doc.save()