details:   https://code.tryton.org/tryton/commit/d3bdcee31589
branch:    default
user:      Cédric Krier <[email protected]>
date:      Tue Jul 28 19:23:07 2026 +0200
description:
        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
diffstat:

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

diffs (22 lines):

diff -r 7868852522d2 -r d3bdcee31589 modules/edocument_peppol/edocument.py
--- a/modules/edocument_peppol/edocument.py     Fri Jul 17 22:11:32 2026 +0200
+++ b/modules/edocument_peppol/edocument.py     Tue Jul 28 19:23:07 2026 +0200
@@ -246,13 +246,17 @@
                 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)

Reply via email to