def get_default_price_list(party):
 if party.default_price_list:
  return party.default_price_list
 if (party.doctype == u'Customer'):
  price_list = frappe.db.get_value(u'Customer Group', party.customer_group, u'default_price_list')
  if price_list:
   return price_list
 return None

def get_default_price_list ( party ) : if party . default_price_list : return party . default_price_list if ( party . doctype == u'Customer' ) : price_list = frappe . db . get_value ( u'Customer Group' , party . customer_group , u'default_price_list' ) if price_list : return price_list return None
return default price list for party .