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
This commit is contained in:
Cédric Krier
2026-02-25 18:54:03 +01:00
parent b27daaf806
commit 6bf0bc1641
+2
View File
@@ -207,6 +207,8 @@ class Peppol(Workflow, ModelSQL, ModelView):
@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)