def get_doctype_module(doctype):
 def make_modules_dict():
  return dict(frappe.db.sql(u'select name, module from tabDocType'))
 return frappe.cache().get_value(u'doctype_modules', make_modules_dict)[doctype]

def get_doctype_module ( doctype ) : def make_modules_dict ( ) : return dict ( frappe . db . sql ( u'select name, module from tabDocType' ) ) return frappe . cache ( ) . get_value ( u'doctype_modules' , make_modules_dict ) [ doctype ]
returns **module def** name of given doctype .