@click.command(u'reload-doctype')
@click.argument(u'doctype')
@pass_context
def reload_doctype(context, doctype):
 for site in context.sites:
  try:
   frappe.init(site=site)
   frappe.connect()
   frappe.reload_doctype(doctype, force=context.force)
   frappe.db.commit()
  finally:
   frappe.destroy()

@ click . command ( u'reload-doctype' ) @ click . argument ( u'doctype' ) @ pass_context def reload_doctype ( context , doctype ) : for site in context . sites : try : frappe . init ( site = site ) frappe . connect ( ) frappe . reload_doctype ( doctype , force = context . force ) frappe . db . commit ( ) finally : frappe . destroy ( )
reload doctype from model files .