def setup_slaves(self): SellableItemSlave.setup_slaves(self) 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)
def setup_proxies(self): SellableItemSlave.setup_proxies(self) self._calc = CalculatorPopup(self.cost, CalculatorPopup.MODE_SUB)