Example #1
0
 def json(self):
     c.product_categories = ProductCategory.find_all()
     result = []
     for category in c.product_categories:
         for product in category.products:
             product_dict = {
                 'id': product.id,
                 'category': category.name,
                 'category_order': category.display_order,
                 'product_order': product.display_order,
                 'cost': product.cost,
                 'description': product.description
             }
             result.append(product_dict)
     return {'r': result}
Example #2
0
 def json(self):
     c.product_categories = ProductCategory.find_all()
     result = []
     for category in c.product_categories:
         for product in category.products:
             product_dict = {
                 'id': product.id,
                  'category': category.name,
                  'category_order': category.display_order,
                  'product_order': product.display_order,
                  'cost': product.cost,
                  'description': product.description
             }
             result.append(product_dict)
     return { 'r': result }
Example #3
0
 def index(self):
     c.can_edit = True
     c.product_category_collection = ProductCategory.find_all()
     return render('/product_category/list.mako')
Example #4
0
 def stats(self, id):
     c.can_edit = True
     c.product_category = ProductCategory.find_by_id(id)
     c.product_categories = ProductCategory.find_all()
     return render('/product_category/stats.mako')
Example #5
0
 def __before__(self, **kwargs):
     c.product_categories = ProductCategory.find_all()
     c.ceilings = Ceiling.find_all()
Example #6
0
 def __before__(self, **kwargs):
     c.product_categories = ProductCategory.find_all()
Example #7
0
 def __before__(self, **kwargs):
     c.product_categories = ProductCategory.find_all()
     c.fulfilment_types = FulfilmentType.find_all()
     c.ceilings = Ceiling.find_all()
 def index(self):
     c.can_edit = True
     c.product_category_collection = ProductCategory.find_all()
     return render('/product_category/list.mako')
 def stats(self, id):
     c.can_edit = True
     c.product_category = ProductCategory.find_by_id(id)
     c.product_categories = ProductCategory.find_all()
     return render('/product_category/stats.mako')
Example #10
0
 def __before__(self, **kwargs):
     c.product_categories = ProductCategory.find_all()
     c.fulfilment_types = FulfilmentType.find_all()
     c.ceilings = Ceiling.find_all()