[Fix] Validation issue for online POS profile (#12276)
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py
index 5710bd4..c13abcb 100644
--- a/erpnext/accounts/doctype/pos_profile/pos_profile.py
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py
@@ -63,7 +63,11 @@
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")