예제 #1
0
파일: doctype.py 프로젝트: hrwX/frappe
	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())
예제 #2
0
    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)
예제 #3
0
    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())
예제 #4
0
파일: doctype.py 프로젝트: Aravinthu/frappe
	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())
예제 #5
0
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)
예제 #6
0
 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})
예제 #7
0
파일: report.py 프로젝트: robulik/frappe
	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})
예제 #8
0
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)
예제 #9
0
	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())
예제 #10
0
파일: doctype.py 프로젝트: saguas/frappe
def init_list(doctype):
    doc = frappe.get_meta(doctype)
    make_boilerplate("controller_list.js", doc)
    make_boilerplate("controller_list.html", doc)
예제 #11
0
def init_list(doctype):
	doc = frappe.get_meta(doctype)
	make_boilerplate("controller_list.js", doc)
	make_boilerplate("controller_list.html", doc)
예제 #12
0
	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)
예제 #13
0
	def make_controller_template(self):
		"""Make boilerplate controller template."""
		make_boilerplate("controller._py", self)
예제 #14
0
	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())