diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index c13abcb7724..846d79d610f 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -107,7 +107,7 @@ def get_item_groups(pos_profile): if pos_profile.get('item_groups'): # Get items based on the item groups defined in the POS profile for data in pos_profile.get('item_groups'): - item_groups.extend(["'%s'"%d.name for d in get_child_nodes('Item Group', data.item_group)]) + item_groups.extend(["'%s'" % frappe.db.escape(d.name) for d in get_child_nodes('Item Group', data.item_group)]) return list(set(item_groups)) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index e450f0bb593..f00f6cca4fa 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -431,7 +431,7 @@ class BuyingController(StockController): d.schedule_date = self.schedule_date if d.schedule_date and getdate(d.schedule_date) < getdate(self.transaction_date): - frappe.throw(_("Expected Date cannot be before Transaction Date")) + frappe.throw(_("Row #{0}: Reqd by Date cannot be before Transaction Date").format(d.idx)) else: - frappe.throw(_("Please enter Schedule Date")) + frappe.throw(_("Please enter Reqd by Date"))