def export_doc(doctype, name, module=None): """Write a doc to standard path.""" from frappe.modules.export_file import write_document_file print(doctype, name) if not module: module = frappe.db.get_value('DocType', name, 'module') write_document_file(frappe.get_doc(doctype, name), module)
def export_doc(doctype, name, module=None): """write out a doc""" from frappe.modules.export_file import write_document_file import frappe.model.doc if not module: module = frappe.db.get_value(doctype, name, 'module') write_document_file(frappe.model.doc.get(doctype, name), module)
def export_doc(doctype, name, module=None): """write out a doc""" from frappe.modules.export_file import write_document_file if not module: module = frappe.db.get_value(doctype, name, "module") write_document_file(frappe.get_doc(doctype, name), module)
def export_to_files(self): """Export Web Template to a new folder. Doc is exported as JSON. The content of the `template` field gets written into a separate HTML file. The template should not be contained in the JSON. """ html, self.template = self.template, "" write_document_file(self, create_init=True) self.create_template_file(html)