当前位置: 首页>>代码示例>>Python>>正文


Python SellableItemStep.sellable_selected方法代码示例

本文整理汇总了Python中stoqlib.gui.wizards.abstractwizard.SellableItemStep.sellable_selected方法的典型用法代码示例。如果您正苦于以下问题:Python SellableItemStep.sellable_selected方法的具体用法?Python SellableItemStep.sellable_selected怎么用?Python SellableItemStep.sellable_selected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在stoqlib.gui.wizards.abstractwizard.SellableItemStep的用法示例。


在下文中一共展示了SellableItemStep.sellable_selected方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: sellable_selected

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import sellable_selected [as 别名]
 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')
开发者ID:,项目名称:,代码行数:9,代码来源:

示例2: sellable_selected

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import sellable_selected [as 别名]
 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)
开发者ID:Joaldino,项目名称:stoq,代码行数:11,代码来源:salequotewizard.py

示例3: sellable_selected

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import sellable_selected [as 别名]
    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))
开发者ID:leandrorchaves,项目名称:stoq,代码行数:13,代码来源:stocktransferwizard.py

示例4: sellable_selected

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import sellable_selected [as 别名]
    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)
开发者ID:romaia,项目名称:stoq,代码行数:18,代码来源:stocktransferwizard.py

示例5: sellable_selected

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import sellable_selected [as 别名]
 def sellable_selected(self, sellable, batch=None):
     SellableItemStep.sellable_selected(self, sellable, batch=batch)
     if sellable:
         self.cost.update(sellable.price)
开发者ID:LeonamSilva,项目名称:stoq,代码行数:6,代码来源:salereturnwizard.py

示例6: sellable_selected

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import sellable_selected [as 别名]
 def sellable_selected(self, sellable):
     SellableItemStep.sellable_selected(self, sellable)
     if sellable:
         self.cost.update(sellable.price)
开发者ID:marianaanselmo,项目名称:stoq,代码行数:6,代码来源:salereturnwizard.py


注:本文中的stoqlib.gui.wizards.abstractwizard.SellableItemStep.sellable_selected方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。