details: https://code.tryton.org/tryton/commit/e15f30b1f4d1
branch: default
user: Cédric Krier <[email protected]>
date: Wed Feb 25 18:54:40 2026 +0100
description:
Test the processing of received Peppol invoice from Peppyrus
diffstat:
modules/edocument_peppol_peppyrus/tests/scenario_edocument_peppol_peppyrus.rst
| 27 ++++++++-
1 files changed, 23 insertions(+), 4 deletions(-)
diffs (56 lines):
diff -r 9a6c6a4a8a04 -r e15f30b1f4d1
modules/edocument_peppol_peppyrus/tests/scenario_edocument_peppol_peppyrus.rst
---
a/modules/edocument_peppol_peppyrus/tests/scenario_edocument_peppol_peppyrus.rst
Wed Feb 25 18:54:03 2026 +0100
+++
b/modules/edocument_peppol_peppyrus/tests/scenario_edocument_peppol_peppyrus.rst
Wed Feb 25 18:54:40 2026 +0100
@@ -6,10 +6,12 @@
>>> import os
>>> import time
+ >>> from decimal import Decimal
>>> from unittest.mock import patch
>>> from proteus import Model
- >>> from trytond.modules.company.tests.tools import create_company
+ >>> from trytond.modules.account.tests.tools import create_chart,
create_tax
+ >>> from trytond.modules.company.tests.tools import create_company,
get_company
>>> from trytond.modules.edocument_peppol.edocument import Peppol
>>> from trytond.tests.tools import activate_modules, assertTrue
>>> from trytond.tools import file_open
@@ -33,12 +35,28 @@
Activate modules::
- >>> config = activate_modules('edocument_peppol_peppyrus', create_company)
+ >>> config = activate_modules(
+ ... 'edocument_peppol_peppyrus', create_company, create_chart)
>>> Cron = Model.get('ir.cron')
>>> Peppol = Model.get('edocument.peppol')
>>> PeppolService = Model.get('edocument.peppol.service')
+Setup company::
+
+ >>> company = get_company()
+ >>> _ = company.party.identifiers.new(type='eu_vat', code=participant_vat)
+ >>> company.party.save()
+ >>> company.currency.code = 'EUR'
+ >>> company.currency.save()
+
+Setup accounting::
+
+ >>> tax = create_tax(Decimal('.1'))
+ >>> tax.unece_code = 'VAT'
+ >>> tax.unece_category_code = 'S'
+ >>> tax.save()
+
Create a service::
>>> peppol_service = PeppolService(sequence=1)
@@ -82,5 +100,6 @@
... if bool(Peppol.find([('direction', '=', 'in')])):
... break
... time.sleep(FETCH_SLEEP)
- >>> bool(Peppol.find([('direction', '=', 'in')]))
- True
+ >>> peppol, = Peppol.find([('direction', '=', 'in')], limit=1)
+ >>> peppol.state
+ 'succeeded'