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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user