def build_match_conditions(doctype, as_condition=True):
 import frappe.desk.reportview
 return frappe.desk.reportview.build_match_conditions(doctype, as_condition)

def build_match_conditions ( doctype , as_condition = True ) : import frappe . desk . reportview return frappe . desk . reportview . build_match_conditions ( doctype , as_condition )
return match for given doctype as list or sql .