def production_orders(order_sno=None): # Presently only supports getting the latest result. A way to allow # any result to be retrieved would be nice. if order_sno is None: docs = dxproduction.get_all_production_orders_docs() stage = {'docs': docs, 'crumbroot': '/production', 'breadcrumbs': [Crumb(name="Production", path=""), Crumb(name="Orders", path="order/")], } return render_template('production_orders.html', stage=stage, pagetitle="All Production Orders") else: production_order = order.ProductionOrder(order_sno) docs = production_order.docs stage = {'docs': docs, 'order': production_order, 'title': production_order.title, 'order_sno': order_sno, 'crumbroot': '/production', 'breadcrumbs': [Crumb(name="Production", path=""), Crumb(name="Orders", path="order/"), Crumb(name=order_sno, path="order/" + order_sno)], # noqa } return render_template('production_order_detail.html', stage=stage, pagetitle="Production Order " + order_sno)
def main(): latest_prod = dxproduction.get_all_production_orders_docs(limit=5) stage = {'latest_prod': latest_prod, 'crumbroot': '/production', 'breadcrumbs': [Crumb(name="Production", path="")], } return render_template('production_main.html', stage=stage, pagetitle='Production')
def main(): latest_prod = dxproduction.get_all_production_orders_docs(limit=5) stage = { 'latest_prod': latest_prod, 'crumbroot': '/production', 'breadcrumbs': [Crumb(name="Production", path="")], } return render_template('production_main.html', stage=stage, pagetitle='Production')
def production_orders(order_sno=None): # Presently only supports getting the latest result. A way to allow # any result to be retrieved would be nice. if order_sno is None: docs = dxproduction.get_all_production_orders_docs() stage = { 'docs': docs, 'crumbroot': '/production', 'breadcrumbs': [ Crumb(name="Production", path=""), Crumb(name="Orders", path="order/") ], } return render_template('production_orders.html', stage=stage, pagetitle="All Production Orders") else: production_order = order.ProductionOrder(order_sno) docs = production_order.docs stage = { 'docs': docs, 'order': production_order, 'title': production_order.title, 'order_sno': order_sno, 'crumbroot': '/production', 'breadcrumbs': [ Crumb(name="Production", path=""), Crumb(name="Orders", path="order/"), Crumb(name=order_sno, path="order/" + order_sno) ], # noqa } return render_template('production_order_detail.html', stage=stage, pagetitle="Production Order " + order_sno)