コード例 #1
0
ファイル: accounteditor.py プロジェクト: ComradeHadi/stoq
 def _save_bank_bill_options(self, bank_account):
     for option, entry in self._option_fields.items():
         value = unicode(entry.get_text())
         bill_option = self.store.find(BillOption,
                                       bank_account=bank_account,
                                       option=option).one()
         if bill_option is None:
             bill_option = BillOption(store=self.store,
                                      bank_account=bank_account,
                                      option=option,
                                      value=value)
         bill_option.value = value
コード例 #2
0
ファイル: accounteditor.py プロジェクト: romaia/stoq
 def _save_bank_bill_options(self, bank_account):
     for option, entry in self._option_fields.items():
         value = unicode(entry.get_text())
         bill_option = self.store.find(BillOption,
                                       bank_account=bank_account,
                                       option=option).one()
         if bill_option is None:
             bill_option = BillOption(store=self.store,
                                      bank_account=bank_account,
                                      option=option,
                                      value=value)
         bill_option.value = value
コード例 #3
0
ファイル: test_account.py プロジェクト: rosalin/stoq
 def test_account_remove_with_bank_account(self):
     account = self.create_account()
     bank = self.create_bank_account(account=account)
     BillOption(option=u'foo',
                value=u'bar',
                bank_account=bank,
                store=self.store)
     account.remove(self.store)
コード例 #4
0
ファイル: test_boleto.py プロジェクト: Felipebros/stoq
    def _configure_boleto(self, number, account, agency, **kwargs):
        bill = PaymentMethod.get_by_name(self.store, u'bill')
        bank_account = BankAccount(account=bill.destination_account,
                                   bank_account=account,
                                   bank_branch=agency,
                                   bank_number=int(number),
                                   store=self.store)

        for key, value in kwargs.items():
            BillOption(store=self.store,
                       bank_account=bank_account,
                       option=str(key),
                       value=value)
        api.sysparam.set_string(self.store, 'BILL_INSTRUCTIONS',
                                u'Primeia linha da instrução')