Ejemplo n.º 1
0
    def __before__(self, **kwargs):
        category = ProductCategory.find_by_name('Accommodation')
        if category and not (len(category.products) == 0 or (len(category.products) == 1 and category.products[0].cost == 0)):
            allowed_categories.append('Accommodation')


        c.product_categories = ProductCategory.find_all()
        self._generate_product_schema()
Ejemplo n.º 2
0
    def __before__(self, **kwargs):
        category = ProductCategory.find_by_name('Accommodation')
        if not (len(category.products) == 0 or (len(category.products) == 1 and category.products[0].cost == 0)):
            allowed_categories.append('Accommodation')


        c.product_categories = ProductCategory.find_all()
        self._generate_product_schema()
Ejemplo n.º 3
0
    def new(self):
        try:
            c.invoice_person = request.GET['person_id']
        except:
            c.invoice_person = ''

        c.due_date = datetime.date.today().strftime("%d/%y/%Y")

        c.product_categories = ProductCategory.find_all()
        c.item_count = 0
        return render("/invoice/new.mako")
Ejemplo n.º 4
0
    def new(self):
        try:
            c.invoice_person = request.GET['person_id']
        except:
            c.invoice_person = ''

        c.due_date = datetime.date.today().strftime("%d/%y/%Y")

        c.product_categories = ProductCategory.find_all()
        c.item_count = 0;
        return render("/invoice/new.mako")