def make_controller_template(self): """Make boilerplate controller template.""" make_boilerplate("controller._py", self) if not self.istable: make_boilerplate("test_controller._py", self.as_dict()) make_boilerplate("controller.js", self.as_dict()) #make_boilerplate("controller_list.js", self.as_dict()) if self.has_web_view: templates_path = frappe.get_module_path(frappe.scrub(self.module), 'doctype', frappe.scrub(self.name), 'templates') if not os.path.exists(templates_path): os.makedirs(templates_path) make_boilerplate('templates/controller.html', self.as_dict()) make_boilerplate('templates/controller_row.html', self.as_dict())
def make_controller_template(self): """Make boilderplate controller template.""" make_boilerplate("controller.py", self) if not (self.istable or self.issingle): make_boilerplate("test_controller.py", self) make_boilerplate("test_records.json", self)
def make_controller_template(self): """Make boilderplate controller template.""" make_boilerplate("controller.py", self) if not (self.istable or self.issingle): make_boilerplate("test_controller.py", self.as_dict()) if not self.istable: make_boilerplate("controller.js", self.as_dict())
def init_list(doctype): """Make boilerplate list views.""" doc = frappe.get_meta(doctype) make_boilerplate("controller_list.js", doc) make_boilerplate("controller_list.html", doc)
def create_report_py(self): if self.report_type == "Script Report": make_boilerplate("controller.py", self, {"name": self.name}) make_boilerplate("controller.js", self, {"name": self.name})
def make_controller_template(self): """Make boilerplate controller template.""" make_boilerplate("controller._py", self) if not self.istable: make_boilerplate("test_controller._py", self.as_dict()) if not self.istable: make_boilerplate("controller.js", self.as_dict()) #make_boilerplate("controller_list.js", self.as_dict()) if not os.path.exists(frappe.get_module_path(frappe.scrub(self.module), 'doctype', frappe.scrub(self.name), 'tests')): make_boilerplate("test_controller.js", self.as_dict()) if self.has_web_view: templates_path = frappe.get_module_path(frappe.scrub(self.module), 'doctype', frappe.scrub(self.name), 'templates') if not os.path.exists(templates_path): os.makedirs(templates_path) make_boilerplate('templates/controller.html', self.as_dict()) make_boilerplate('templates/controller_row.html', self.as_dict())
def init_list(doctype): doc = frappe.get_meta(doctype) make_boilerplate("controller_list.js", doc) make_boilerplate("controller_list.html", doc)
def make_controller_template(self): make_boilerplate("controller.py", self) if not (self.istable or self.issingle): make_boilerplate("test_controller.py", self) make_boilerplate("test_records.json", self)
def make_controller_template(self): """Make boilerplate controller template.""" make_boilerplate("controller._py", self)
def import_doc(self): """Import from standard folder `[module]/doctype/[name]/[name].json`.""" from frappe.modules.import_module import import_from_files import_from_files(record_list=[[self.module, 'doctype', self.name]]) def make_controller_template(self): """Make boilerplate controller template.""" make_boilerplate("controller._py", self) <<<<<<< HEAD if not (self.istable or self.issingle): ======= if not self.istable: >>>>>>> 176d241496ede1357a309fa44a037b757a252581 make_boilerplate("test_controller._py", self.as_dict()) if not self.istable: make_boilerplate("controller.js", self.as_dict()) #make_boilerplate("controller_list.js", self.as_dict()) if not os.path.exists(frappe.get_module_path(frappe.scrub(self.module), 'doctype', frappe.scrub(self.name), 'tests')): make_boilerplate("test_controller.js", self.as_dict()) if self.has_web_view: templates_path = frappe.get_module_path(frappe.scrub(self.module), 'doctype', frappe.scrub(self.name), 'templates') if not os.path.exists(templates_path): os.makedirs(templates_path) make_boilerplate('templates/controller.html', self.as_dict()) make_boilerplate('templates/controller_row.html', self.as_dict())