def clear_cache(user=None, doctype=None): """clear boot cache""" if doctype: from webnotes.model.doctype import clear_cache clear_cache(doctype) else: from webnotes.sessions import clear clear(user)
def execute(): from webnotes.modules import reload_doc reload_doc('core', 'doctype', 'print_format') reload_doc('core', 'doctype', 'doclayer') reload_doc('core', 'doctype', 'doclayerfield') reload_doc('accounts', 'doctype', 'gl_entry') from webnotes.model.doc import Document d = Document('DocType Label') d.dt = "Customize Form" d.dt_label = "Customize Form View" d.save(1) from webnotes.sessions import clear clear()