def sellable_selected(self, sellable, batch=None): SellableItemStep.sellable_selected(self, sellable, batch=batch) if sellable: price = sellable.get_price_for_category( self.model.client_category) self.cost.set_text("%s" % price) self.proxy.update('cost')
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)
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)
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))
def sellable_selected(self, sellable): SellableItemStep.sellable_selected(self, sellable) if sellable is None: 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))
def sellable_selected(self, sellable): SellableItemStep.sellable_selected(self, sellable) if sellable is None: return storable = sellable.product_storable stock_item = storable.get_stock_item(self.branch) self.stock_quantity.set_label("%s" % stock_item.quantity or 0) quantity = self._get_stock_balance(sellable) has_quantity = quantity > 0 self.quantity.set_sensitive(has_quantity) self.add_sellable_button.set_sensitive(has_quantity) if has_quantity: self.quantity.set_range(1, quantity)
def sellable_selected(self, sellable): SellableItemStep.sellable_selected(self, sellable) if sellable is None: return storable = sellable.product_storable # TODO: Add batch information here. stock_item = storable.get_stock_item(self.branch, batch=None) self.stock_quantity.set_label("%s" % stock_item.quantity or 0) quantity = self._get_stock_balance(sellable) has_quantity = quantity > 0 self.quantity.set_sensitive(has_quantity) self.add_sellable_button.set_sensitive(has_quantity) if has_quantity: self.quantity.set_range(1, quantity)
def sellable_selected(self, sellable, batch=None): SellableItemStep.sellable_selected(self, sellable, batch=batch) if sellable: self.cost.update(sellable.price)
def sellable_selected(self, sellable, batch=None): SellableItemStep.sellable_selected(self, sellable, batch=batch) if sellable: self.cost.update(sellable.price)
def sellable_selected(self, sellable): SellableItemStep.sellable_selected(self, sellable) if sellable: self.cost.update(sellable.price)
def sellable_selected(self, sellable): SellableItemStep.sellable_selected(self, sellable) if sellable: self.cost.update(sellable.price)
def sellable_selected(self, sellable): SellableItemStep.sellable_selected(self, sellable) if sellable: price = sellable.get_price_for_category(self.model.client_category) self.cost.set_text("%s" % price) self.proxy.update('cost')