def export_doc(self): # export import conf if self.doc.is_standard == 'Yes' and getattr(conf, 'developer_mode', 0) == 1: from webnotes.modules.export_file import export_to_files export_to_files(record_list=[['Report', self.doc.name]], record_module=webnotes.conn.get_value("DocType", self.doc.ref_doctype, "module"))
def on_update(self): """ Writes the .txt for this page and if write_content is checked, it will write out a .html file """ import conf from webnotes.modules.import_file import in_import if not in_import and getattr(conf,'developer_mode', 0) and self.doc.standard=='Yes': from webnotes.modules.export_file import export_to_files from webnotes.modules import get_module_path, scrub import os export_to_files(record_list=[['Page', self.doc.name]]) # write files path = os.path.join(get_module_path(self.doc.module), 'page', scrub(self.doc.name), scrub(self.doc.name)) # js if not os.path.exists(path + '.js'): with open(path + '.js', 'w') as f: f.write("""wn.pages['%s'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, title: '%s', single_column: true }); }""" % (self.doc.name, self.doc.title))
def export_doc(self): # export if self.doc.standard == 'Yes' and (conf.get('developer_mode') or 0) == 1: from webnotes.modules.export_file import export_to_files export_to_files(record_list=[['Print Format', self.doc.name]], record_module=self.doc.module)
def on_update(self): """ Writes the .txt for this page and if write_content is checked, it will write out a .html file """ import conf if not webnotes.in_import and getattr(conf,'developer_mode', 0) and self.doc.standard=='Yes': from webnotes.modules.export_file import export_to_files from webnotes.modules import get_module_path, scrub import os export_to_files(record_list=[['Page', self.doc.name]]) # write files path = os.path.join(get_module_path(self.doc.module), 'page', scrub(self.doc.name), scrub(self.doc.name)) # js if not os.path.exists(path + '.js'): with open(path + '.js', 'w') as f: f.write("""wn.pages['%s'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, title: '%s', single_column: true }); }""" % (self.doc.name, self.doc.title))
def export_doc(self): # export import conf if self.doc.standard == 'Yes' and getattr(conf, 'developer_mode', 0) == 1: from webnotes.modules.export_file import export_to_files export_to_files(record_list=[['Search Criteria', self.doc.name]])
def on_update(self): """ If developer_mode = 1, mapper will be written to files """ import conf if hasattr(conf, 'developer_mode') and conf.developer_mode: from webnotes.modules.export_file import export_to_files export_to_files(record_list=[[self.doc.doctype, self.doc.name]])
def export_doc(self): # export if self.doc.is_standard == 'Yes' and getattr(conf, 'developer_mode', 0) == 1: from webnotes.modules.export_file import export_to_files export_to_files(record_list=[['Report', self.doc.name]], record_module=webnotes.conn.get_value( "DocType", self.doc.ref_doctype, "module"))
def export_doc(self): from webnotes.modules.export_file import export_to_files if self.doc.is_standard == 'Yes' and (conf.get('developer_mode') or 0) == 1: export_to_files(record_list=[['Report', self.doc.name]], record_module=webnotes.conn.get_value("DocType", self.doc.ref_doctype, "module")) elif self.doc.is_standard == 'No' and self.doc.report_type == "Script Report": from webnotes.plugins import get_plugin_name export_to_files(record_list=[['Report', self.doc.name]], record_module=webnotes.conn.get_value("DocType", self.doc.ref_doctype, "module"), plugin=get_plugin_name("Report", self.doc.name), create_init=False)
def export_doc(self): from webnotes.modules.export_file import export_to_files if self.doc.is_standard == 'Yes' and (conf.get('developer_mode') or 0) == 1: export_to_files(record_list=[['Report', self.doc.name]], record_module=webnotes.conn.get_value( "DocType", self.doc.ref_doctype, "module")) elif self.doc.is_standard == 'No' and self.doc.report_type == "Script Report": from webnotes.plugins import get_plugin_name export_to_files(record_list=[['Report', self.doc.name]], record_module=webnotes.conn.get_value( "DocType", self.doc.ref_doctype, "module"), plugin=get_plugin_name("Report", self.doc.name), create_init=False)
def export_doc(self): # export if self.doc.standard == 'Yes' and getattr(conf, 'developer_mode', 0) == 1: from webnotes.modules.export_file import export_to_files export_to_files(record_list=[['Print Format', self.doc.name]], record_module=self.doc.module)
def export_doc(self): from webnotes.modules.export_file import export_to_files export_to_files(record_list=[['DocType', self.doc.name]])
def export_doc(self): # export if self.doc.standard == "Yes" and (webnotes.conf.get("developer_mode") or 0) == 1: from webnotes.modules.export_file import export_to_files export_to_files(record_list=[["Print Format", self.doc.name]], record_module=self.doc.module)