コード例 #1
0
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)
コード例 #2
0
ファイル: utils.py プロジェクト: ESS-LLP/frappe
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)
コード例 #3
0
ファイル: __init__.py プロジェクト: fogueri/frappe
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)
コード例 #4
0
ファイル: __init__.py プロジェクト: BIANBS/frappe
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)
コード例 #5
0
	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)