From da12aac25479895bdbc3028a5622facb75e68ec4 Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Wed, 11 Dec 2024 18:06:33 +0100 Subject: [PATCH] 5.0: compatibility to Tryton 5.0 --- .env | 2 +- README.rst | 27 +++------------------------ tests/test_invoice.py | 15 ++++----------- tryton.cfg | 3 ++- versiondep.txt | 3 ++- view/configuration_form.xml | 2 +- wizard_runreport.py | 2 +- xreport.py | 2 +- 8 files changed, 15 insertions(+), 41 deletions(-) diff --git a/.env b/.env index d0efcdf..de6cefe 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -PYTHONPATH=~/Projekte/tr70/lib/python3.10/site-packages \ No newline at end of file +PYTHONPATH=~/Projekte/tr50/lib/python3.10/site-packages \ No newline at end of file diff --git a/README.rst b/README.rst index 412c2e4..442ee22 100644 --- a/README.rst +++ b/README.rst @@ -9,32 +9,11 @@ pip install mds-account-invoice-xrechnung Requires ======== -- Tryton 6.0 +- Tryton 5.0 Changes ======= -*6.0.6 - 11.12.2024* +*5.0.6 - 11.12.2024* -- re-create invoice-report if not pdf and zugferd-export - -*6.0.5 - 10.12.2024* - -- update tests for iban in xml-export -- add: export formats: factur-x, ZUGFeRD, XRechnung 2.3 + 3.0 - -*6.0.3 - 30.06.2023* - -- add: credit-note - -*6.0.2 - 20.10.2022* - -- add: msg if invoice is not posted - -*6.0.1 - 20.10.2022* - -- works - -*6.0.0 - 18.10.2022* - -- init +- compatiblitiy to Tryton 5.0 diff --git a/tests/test_invoice.py b/tests/test_invoice.py index d502547..455f1d7 100644 --- a/tests/test_invoice.py +++ b/tests/test_invoice.py @@ -18,16 +18,10 @@ from .xml_data import xml_from_pdf def set_invoice_sequences(fiscalyear): pool = Pool() Sequence = pool.get('ir.sequence.strict') - SequenceType = pool.get('ir.sequence.type') InvoiceSequence = pool.get('account.fiscalyear.invoice_sequence') - ModelData = pool.get('ir.model.data') - sequence = Sequence( - name=fiscalyear.name, - sequence_type=SequenceType(ModelData.get_id( - 'account_invoice', 'sequence_type_account_invoice')), - company=fiscalyear.company, - ) + sequence = Sequence(name=fiscalyear.name, code='account.invoice') + sequence.company = fiscalyear.company sequence.save() fiscalyear.invoice_sequences = [] invoice_sequence = InvoiceSequence() @@ -132,7 +126,7 @@ class InvoiceTestCase(ModuleTestCase): 'addresses': [('create', [{ 'invoice': True, 'street': 'Applicant Street 1', - 'postal_code': '12345', + 'zip': '12345', 'city': 'Usertown', 'country': country_de.id, }])], @@ -199,7 +193,7 @@ class InvoiceTestCase(ModuleTestCase): self.assertEqual( list(result['view']['defaults'].keys()), [ 'as_zip', 'edocument', 'invoice', 'state', - 'invoice.']) + 'invoice.rec_name']) data = {} for x in result['view']['defaults'].keys(): @@ -225,7 +219,6 @@ class InvoiceTestCase(ModuleTestCase): action['report_name'], 'account_invoice_xrechnung.export') self.assertEqual(action['type'], 'ir.action.report') - self.assertEqual(action['records'], 'selected') # 2nd step, wizard told us which report we must execute ReportExport = pool.get( diff --git a/tryton.cfg b/tryton.cfg index 0dbf49a..063988d 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,9 +1,10 @@ [tryton] -version=6.0.6 +version=5.0.6 depends: account_invoice bank edocument_xrechnung + tryton6_backport xml: message.xml configuration.xml diff --git a/versiondep.txt b/versiondep.txt index b10fb66..aa3485b 100644 --- a/versiondep.txt +++ b/versiondep.txt @@ -1 +1,2 @@ -edocument_xrechnung;6.0.9;6.0.999;mds +edocument_xrechnung;5.0.9;5.0.999;mds +tryton6_backport;5.0.3;5.0.999:mds diff --git a/view/configuration_form.xml b/view/configuration_form.xml index 55fb986..4bb397e 100644 --- a/view/configuration_form.xml +++ b/view/configuration_form.xml @@ -4,7 +4,7 @@ full copyright notices and license terms. --> - +