chore: add query functions to whitelist

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai
2020-07-02 12:35:41 +05:30
parent aa1210921b
commit ed0bb20e6f
20 changed files with 34 additions and 12 deletions

View File

@@ -65,6 +65,7 @@ def make_invoice(table, customer, mode_of_payment):
return invoice.name
@frappe.whitelist()
def item_query_restaurant(doctype='Item', txt='', searchfield='name', start=0, page_len=20, filters=None, as_dict=False):
'''Return items that are selected in active menu of the restaurant'''
restaurant, menu = get_restaurant_and_menu_name(filters['table'])
@@ -84,4 +85,4 @@ def get_restaurant_and_menu_name(table):
if not menu:
frappe.throw(_('Please set an active menu for Restaurant {0}').format(restaurant))
return restaurant, menu
return restaurant, menu