def show_history(self): product_id = self.request.matchdict['product_id'] product = Product.load(product_id) self.forbid_if(not product or product.company.enterprise_id != self.enterprise_id) return {'product' : product, 'events' : util.select_list(StatusEvent.find_all_applicable(self.enterprise_id, product), 'event_id', 'display_name'), 'history' : Status.find(product) }
def show_history(self): purchase_order_id = self.request.matchdict.get('purchase_order_id') purchase = PurchaseOrder.load(purchase_order_id) self.forbid_if(not purchase or purchase.company.enterprise_id != self.enterprise_id) return { 'history' : Status.find(purchase), 'purchase' : purchase, 'offset' : self.offset }