Exemplo n.º 1
0
 def sellable_selected(self, sellable, batch=None):
     # We may receive a batch if the user typed a batch number instead of a
     # product code, but we pass batch=None here since the user must select
     # the batch when confirming a sale.
     SellableItemStep.sellable_selected(self, sellable, batch=None)
     if sellable:
         price = sellable.get_price_for_category(self.model.client_category)
         self.cost.update(price)
Exemplo n.º 2
0
    def sellable_selected(self, sellable, batch=None):
        SellableItemStep.sellable_selected(self, sellable, batch=batch)

        if sellable is None or not sellable.product.manage_stock:
            return

        storable = sellable.product_storable
        # FIXME: We should not have to override this method. This should
        # be done automatically on SellableItemStep
        self.stock_quantity.set_label(
            "%s" % storable.get_balance_for_branch(branch=self.model.branch))
Exemplo n.º 3
0
 def sellable_selected(self, sellable, batch=None):
     SellableItemStep.sellable_selected(self, sellable, batch=batch)
     if sellable:
         self.cost.update(sellable.price)