From 2640c7eec5a6e3a4114742a058c3d0df23e48e3c Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 1 Jan 2018 16:15:41 +0530 Subject: [PATCH] [Fix] Validation issue for online POS profile (#12276) --- erpnext/accounts/doctype/pos_profile/pos_profile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index 5710bd4f3e6..c13abcb7724 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -63,7 +63,11 @@ class POSProfile(Document): if len(default_mode_of_payment) > 1: frappe.throw(_("Multiple default mode of payment is not allowed")) + def validate_customer_territory_group(self): + if not frappe.db.get_single_value('POS Settings', 'use_pos_in_offline_mode'): + return + if not self.territory: frappe.throw(_("Territory is Required in POS Profile"), title="Mandatory Field")