Esempio n. 1
0
 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)
Esempio n. 2
0
    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.from_delivery(delivery)
        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)
Esempio n. 3
0
    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)
 def setup_slaves(self):
     SellableItemStep.setup_slaves(self)
Esempio n. 5
0
 def setup_slaves(self):
     SellableItemStep.setup_slaves(self)
     self.hide_add_button()
     self.cost_label.hide()
     self.cost.hide()
Esempio n. 6
0
 def setup_slaves(self):
     SellableItemStep.setup_slaves(self)
     self.item_lbl.set_text(_(u'Services:'))
     self.hide_add_button()
     self.cost_label.hide()
     self.cost.hide()