details:   https://code.tryton.org/tryton/commit/a9c0ced943d8
branch:    7.8
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
        (grafted from 9a6c6a4a8a045beff09850068905ab338ae24595)
diffstat:

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

diffs (12 lines):

diff -r f1e57312ea53 -r a9c0ced943d8 modules/edocument_peppol/edocument.py
--- a/modules/edocument_peppol/edocument.py     Thu Jan 08 17:37:09 2026 +0100
+++ b/modules/edocument_peppol/edocument.py     Wed Feb 25 18:54:03 2026 +0100
@@ -201,6 +201,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