details:   https://code.tryton.org/tryton/commit/9a6c6a4a8a04
branch:    default
user:      Cédric Krier <[email protected]>
date:      Wed Feb 25 18:54:03 2026 +0100
description:
        Set state to processing for Peppol edocument before actually process 
them

        The actual process method checks that the state of the document is still
        processing so it must be written before and not rely on the transition 
to write
        it.

        Closes #14626
diffstat:

 modules/edocument_peppol/edocument.py |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 38f7eb92abc6 -r 9a6c6a4a8a04 modules/edocument_peppol/edocument.py
--- a/modules/edocument_peppol/edocument.py     Thu Feb 26 09:35:20 2026 +0100
+++ b/modules/edocument_peppol/edocument.py     Wed Feb 25 18:54:03 2026 +0100
@@ -207,6 +207,8 @@
     @Workflow.transition('processing')
     def process(cls, documents):
         cls.lock(documents)
+        # write state before calling _process
+        cls.write(documents, {'state': 'processing'})
         for document in documents:
             if document.direction == 'out':
                 cls.__queue__._process(document)

Reply via email to