From 234ca3f7fd86f35eb6c6f1a3a959ac3fbacd9cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 28 Jul 2026 19:23:07 +0200 Subject: [PATCH] Set button decorator of update Peppol status to a different method than the cron The `ModelView.button` decorator requires to be called with a list of records which the cron does not do. Closes #14972 (grafted from d3bdcee315895e3fc4a636c14dad5ba592912c59) --HG-- branch : 8.0 --- modules/edocument_peppol/edocument.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/edocument_peppol/edocument.py b/modules/edocument_peppol/edocument.py index e0458985dc..581278e7e4 100644 --- a/modules/edocument_peppol/edocument.py +++ b/modules/edocument_peppol/edocument.py @@ -239,13 +239,17 @@ class Peppol(Workflow, ModelSQL, ModelView): self.succeed() @classmethod - @ModelView.button def update_status(cls, documents=None): if documents is None: documents = cls.search([ ('direction', '=', 'out'), ('state', '=', 'processing'), ]) + cls.update_status_button(documents) + + @classmethod + @ModelView.button + def update_status_button(cls, documents): for document in documents: document._update_status() cls.save(documents)