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


Python SellableItemStep.setup_slaves方法代码示例

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


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

示例1: setup_slaves

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import setup_slaves [as 别名]
    def setup_slaves(self):
        SellableItemStep.setup_slaves(self)
        self.hide_add_button()
        self.cost_label.set_label(_('Price:'))
        self.cost.set_editable(True)

        delivery = self._find_delivery()
        if delivery is not None:
            self._delivery_item = delivery.service_item
            self._delivery = CreateDeliveryModel(
                price=self._delivery_item.price, notes=self._delivery_item.notes,
                transporter=delivery.transporter, address=delivery.address,
                estimated_fix_date=self._delivery_item.estimated_fix_date)
        else:
            self._delivery = None
            self._delivery_item = None

        if isinstance(self.model, Sale):
            self.delivery_btn = self.slave.add_extra_button(label=_("Add delivery"))
            self.delivery_btn.set_sensitive(bool(len(self.slave.klist)))
        else:
            self.delivery_btn = None

        self.discount_btn = self.slave.add_extra_button(label=_("Apply discount"))
        self.discount_btn.set_sensitive(bool(len(self.slave.klist)))
        self.slave.klist.connect('has-rows', self._on_klist__has_rows)
        self.slave.klist.connect('selection-changed',
                                 self._on_klist__selection_changed)
开发者ID:,项目名称:,代码行数:30,代码来源:

示例2: setup_slaves

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import setup_slaves [as 别名]
 def setup_slaves(self):
     SellableItemStep.setup_slaves(self)
     self.hide_add_button()
     self.cost.set_editable(True)
     self.quantity.connect('validate', self._on_quantity__validate)
     self.slave.klist.connect('selection-changed',
                              self._on_klist_selection_changed)
开发者ID:Guillon88,项目名称:stoq,代码行数:9,代码来源:purchasewizard.py

示例3: setup_slaves

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import setup_slaves [as 别名]
    def setup_slaves(self):
        SellableItemStep.setup_slaves(self)
        self.hide_add_button()

        if not self.wizard.create_payments:
            self.cost_label.hide()
            self.cost.hide()
        self.quantity.connect('validate', self._on_quantity__validate)
开发者ID:romaia,项目名称:stoq,代码行数:10,代码来源:stockdecreasewizard.py

示例4: setup_slaves

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import setup_slaves [as 别名]
    def setup_slaves(self):
        SellableItemStep.setup_slaves(self)
        self._delivery = None
        self._delivery_item = None

        self.delivery_button = self.slave.add_extra_button(label=_("Add Delivery"))
        self.delivery_button.set_sensitive(bool(len(self.slave.klist)))

        self.slave.klist.connect('has_rows', self._on_klist__has_rows)
        self.delivery_button.connect('clicked',
                                     self._on_delivery_button__clicked)
开发者ID:hackedbellini,项目名称:stoq,代码行数:13,代码来源:stockdecreasewizard.py

示例5: setup_slaves

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import setup_slaves [as 别名]
 def setup_slaves(self):
     SellableItemStep.setup_slaves(self)
     self.hide_add_button()
     self.cost_label.hide()
     self.cost.hide()
开发者ID:marianaanselmo,项目名称:stoq,代码行数:7,代码来源:productionwizard.py

示例6: setup_slaves

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import setup_slaves [as 别名]
 def setup_slaves(self):
     SellableItemStep.setup_slaves(self)
开发者ID:leandrorchaves,项目名称:stoq,代码行数:4,代码来源:stocktransferwizard.py

示例7: setup_slaves

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import setup_slaves [as 别名]
    def setup_slaves(self):
        SellableItemStep.setup_slaves(self)
        self.hide_add_button()

        self.cost.set_editable(True)
        self.quantity.connect('validate', self._on_quantity__validate)
开发者ID:pkaislan,项目名称:stoq,代码行数:8,代码来源:purchasewizard.py

示例8: setup_slaves

# 需要导入模块: from stoqlib.gui.wizards.abstractwizard import SellableItemStep [as 别名]
# 或者: from stoqlib.gui.wizards.abstractwizard.SellableItemStep import setup_slaves [as 别名]
 def setup_slaves(self):
     SellableItemStep.setup_slaves(self)
     self.hide_add_button()
     self.cost_label.set_label('Price:')
     self.cost.set_editable(True)
开发者ID:rosalin,项目名称:stoq,代码行数:7,代码来源:salequotewizard.py


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