mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
chore: add query functions to whitelist
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user