Add template
This commit is contained in:
parent
993358d5d7
commit
aad8257e20
@ -44,7 +44,7 @@ calendars = ["Task", "Production Order", "Leave Application", "Sales Order", "Ho
|
||||
|
||||
fixtures = ["Web Form"]
|
||||
|
||||
website_generators = ["Item Group", "Item", "Sales Partner", "Job Opening", "Student Admission"]
|
||||
website_generators = ["Item Group", "Item", "BOM", "Sales Partner", "Job Opening", "Student Admission"]
|
||||
|
||||
website_context = {
|
||||
"favicon": "/assets/erpnext/images/favicon.png",
|
||||
@ -96,6 +96,7 @@ website_route_rules = [
|
||||
},
|
||||
{"from_route": "/jobs", "to_route": "Job Opening"},
|
||||
{"from_route": "/admissions", "to_route": "Student Admission"},
|
||||
{"from_route": "/bom", "to_route": "BOM"},
|
||||
]
|
||||
|
||||
portal_menu_items = [
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,8 +5,8 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.utils import cint, cstr, flt
|
||||
from frappe import _
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
from frappe.model.document import Document
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
|
||||
from operator import itemgetter
|
||||
|
||||
@ -14,7 +14,13 @@ form_grid_templates = {
|
||||
"items": "templates/form_grid/item_grid.html"
|
||||
}
|
||||
|
||||
class BOM(Document):
|
||||
class BOM(WebsiteGenerator):
|
||||
website = frappe._dict(
|
||||
page_title_field = "item_name",
|
||||
condition_field = "show_in_website",
|
||||
template = "templates/generators/bom.html"
|
||||
)
|
||||
|
||||
def autoname(self):
|
||||
names = frappe.db.sql_list("""select name from `tabBOM` where item=%s""", self.item)
|
||||
|
||||
|
3
erpnext/templates/generators/bom.html
Normal file
3
erpnext/templates/generators/bom.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% block content %}
|
||||
Hello
|
||||
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user