示例#1
0
 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
 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
 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
    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')