add iban to tests
This commit is contained in:
parent
bd39ae228a
commit
e0cd1a08f1
2 changed files with 30 additions and 5 deletions
|
@ -120,6 +120,8 @@ class InvoiceTestCase(ModuleTestCase):
|
|||
ActionReport = pool.get('ir.action.report')
|
||||
ExportWiz = pool.get('account_invoice_xrechnung.runrep', type='wizard')
|
||||
Tax = pool.get('account.tax')
|
||||
BankAccount = pool.get('bank.account')
|
||||
Bank = pool.get('bank')
|
||||
|
||||
country_de, = Country.create([{
|
||||
'name': 'Germany',
|
||||
|
@ -147,6 +149,19 @@ class InvoiceTestCase(ModuleTestCase):
|
|||
with set_company(company1):
|
||||
with Transaction().set_context({'company': company1.id}):
|
||||
|
||||
bank_party, = Party.create([{
|
||||
'name': 'Bank 123',
|
||||
'addresses': [('create', [{}])]}])
|
||||
bank, = Bank.create([{'party': bank_party.id}])
|
||||
|
||||
acc_company, = BankAccount.create([
|
||||
{
|
||||
'bank': bank.id,
|
||||
'owners': [('add', [company1.party.id])],
|
||||
'numbers': [('create', [{
|
||||
'type': 'iban',
|
||||
'number': 'DE02300209000106531065'}])]}])
|
||||
|
||||
# update report to 'pdf'
|
||||
inv_report, = ActionReport.search([
|
||||
('model', '=', 'account.invoice'),
|
||||
|
@ -155,7 +170,9 @@ class InvoiceTestCase(ModuleTestCase):
|
|||
ActionReport.write(*[
|
||||
[inv_report], {'extension': 'pdf'}])
|
||||
|
||||
cfg1 = Configuration(xrechn_zugferd_report=inv_report)
|
||||
cfg1 = Configuration(
|
||||
xrechn_zugferd_report=inv_report,
|
||||
edocument_bank=list(acc_company.numbers))
|
||||
cfg1.save()
|
||||
self.assertEqual(cfg1.xrechn_zugferd_report.name, 'Invoice')
|
||||
create_chart(company=company1, tax=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue