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

13 lines
371 B
Python

# 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')
frappe.reload_doc('accounts', 'doctype', 'pos_settings')
doc = frappe.get_doc('POS Settings')
doc.use_pos_in_offline_mode = 1
doc.save()