Add an "Update Status" button to the Peppol document

This commit is contained in:
Cédric Krier
2026-01-15 10:35:05 +01:00
parent f7f8c002b7
commit 14c2a4435c
5 changed files with 16 additions and 5 deletions
+7
View File
@@ -146,6 +146,12 @@ class Peppol(Workflow, ModelSQL, ModelView):
'invisible': ~Eval('state').in_(['submitted', 'processing']),
'depends': ['state'],
},
update_status={
'invisible': (
(Eval('state') != 'processing')
| (Eval('direction') != 'out')),
'depends': ['state', 'direction'],
},
retry={
'invisible': Eval('state') != 'failed',
'depends': ['state'],
@@ -230,6 +236,7 @@ class Peppol(Workflow, ModelSQL, ModelView):
self.succeed()
@classmethod
@ModelView.button
def update_status(cls, documents=None):
if documents is None:
documents = cls.search([