diff --git a/tests/test_invoice.py b/tests/test_invoice.py
index 621995b..d502547 100644
--- a/tests/test_invoice.py
+++ b/tests/test_invoice.py
@@ -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)
diff --git a/tests/xml_data.py b/tests/xml_data.py
index 0c0eed9..2f9f1c6 100644
--- a/tests/xml_data.py
+++ b/tests/xml_data.py
@@ -25,7 +25,7 @@ xml_from_pdf = """
1
-
+
Product 1
@@ -76,9 +76,17 @@ xml_from_pdf = """
1
usd
-
- 1
-
+
+ 30
+ Wire transfer
+
+ DE02300209000106531065
+ Bank 123
+
+
+
+
+
20.00
GST