本文整理汇总了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)
示例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)
示例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)
示例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)
示例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()
示例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)
示例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)
示例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)