def __init__(self, wizard, previous, store, model, method, outstanding_value=None, finish_on_total=True): """ :param wizard: the wizard this step is in :param previous: the previous step if there is any :param store: the store this step is executed :param model: the model of this step :param method: the payment method :param finish_on_total: if it is ``True`` automatically closes the wizard when payments total is equals to the total cost of the operation. When it is ``False``, waits for the user to click the finish button :param outstanding_value: if this value is not ``None``, it will be used as the total value of the payment """ self._method_name = method self._method_slave = None self.model = model if outstanding_value is None: outstanding_value = currency(0) self._outstanding_value = outstanding_value self._finish_on_total = finish_on_total BaseWizardStep.__init__(self, store, wizard, previous) register_payment_slaves() self._create_ui()
def setup_slaves(self): register_payment_slaves() self.slave = MultipleMethodSlave(self, self, self.store, order=self.model, outstanding_value=currency(0), finish_on_total=False) self.slave.enable_remove() self.attach_slave('place_holder', self.slave)
def _setup_widgets(self): register_payment_slaves() self._ms = SelectPaymentMethodSlave(store=self.store, payment_type=Payment.TYPE_OUT, default_method=self._method, no_payments=True) self._ms.connect_after('method-changed', self._after_method_select__method_changed) self.attach_slave('method_select_holder', self._ms) self._update_payment_method_slave()
def setup_slaves(self): register_payment_slaves() self.slave = MultipleMethodSlave(wizard=self.wizard, parent=self, store=self.store, order=self.model, payment_method=None, finish_on_total=False, allow_remove_paid=False, require_total_value=False) self.slave.enable_remove() self.attach_slave('place_holder', self.slave)
def __init__(self, store): register_payment_slaves() self.purchase_model = None first_step = ConsignmentSelectionStep(self, store) BaseWizard.__init__(self, store, first_step, None) self.next_button.set_sensitive(False)