コード例 #1
0
ファイル: paymentseditor.py プロジェクト: Joaldino/stoq
 def setup_slaves(self):
     register_payment_slaves()
     self.slave = MultipleMethodSlave(self, self, self.store,
                                      self.model, None, currency(0),
                                      finish_on_total=False)
     self.slave.enable_remove()
     self.attach_slave('place_holder', self.slave)
コード例 #2
0
    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()
コード例 #3
0
ファイル: salewizard.py プロジェクト: romaia/stoq
    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()
コード例 #4
0
ファイル: paymentseditor.py プロジェクト: tmaxter/stoq
 def setup_slaves(self):
     register_payment_slaves()
     self.slave = MultipleMethodSlave(self, self, self.store,
                                      self.model, None, currency(0),
                                      finish_on_total=False)
     self.slave.enable_remove()
     self.attach_slave('place_holder', self.slave)
コード例 #5
0
    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()
コード例 #6
0
ファイル: salereturnwizard.py プロジェクト: LeonamSilva/stoq
 def setup_slaves(self):
     register_payment_slaves()
     outstanding_value = (self.model.total_amount_abs +
                          self.model.paid_total)
     self.slave = MultipleMethodSlave(self.wizard, self, self.store,
                                      self.model, None,
                                      outstanding_value=outstanding_value,
                                      finish_on_total=False,
                                      allow_remove_paid=False)
     self.slave.enable_remove()
     self.attach_slave('place_holder', self.slave)
コード例 #7
0
ファイル: salereturnwizard.py プロジェクト: lulzzz/stoq
 def setup_slaves(self):
     register_payment_slaves()
     outstanding_value = (self.model.total_amount_abs +
                          self.model.paid_total)
     self.slave = MultipleMethodSlave(self.wizard, self, self.store,
                                      self.model, None,
                                      outstanding_value=outstanding_value,
                                      finish_on_total=False,
                                      allow_remove_paid=False)
     self.slave.enable_remove()
     self.attach_slave('place_holder', self.slave)
コード例 #8
0
ファイル: purchasewizard.py プロジェクト: rosalin/stoq
    def _setup_widgets(self):
        register_payment_slaves()

        self._ms = SelectPaymentMethodSlave(store=self.store,
                                            payment_type=Payment.TYPE_OUT,
                                            default_method=self._method)
        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()
コード例 #9
0
 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)
コード例 #10
0
 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)
コード例 #11
0
 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)
コード例 #12
0
ファイル: consignmentwizard.py プロジェクト: esosaja/stoq
 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)