[fix] minor for quick-entry
diff --git a/erpnext/utilities/bot.py b/erpnext/utilities/bot.py
index e1f3d00..23e1dd4 100644
--- a/erpnext/utilities/bot.py
+++ b/erpnext/utilities/bot.py
@@ -11,6 +11,9 @@
class FindItemBot(BotParser):
def get_reply(self):
if self.startswith('where is', 'find item', 'locate'):
+ if not frappe.has_permission('Warehouse'):
+ raise frappe.PermissionError
+
item = '%{0}%'.format(self.strip_words(self.query, 'where is', 'find item', 'locate'))
items = frappe.db.sql('''select name from `tabItem` where item_code like %(txt)s
or item_name like %(txt)s or description like %(txt)s''', dict(txt=item))