details:   https://code.tryton.org/tryton/commit/beb60346fb5d
branch:    default
user:      Cédric Krier <[email protected]>
date:      Fri Oct 16 10:52:57 2026 +0200
description:
        Add the method string to the record name of cron task

        Closes #15174
diffstat:

 trytond/trytond/ir/cron.py |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (21 lines):

diff -r 3739409035ff -r beb60346fb5d trytond/trytond/ir/cron.py
--- a/trytond/trytond/ir/cron.py        Wed Oct 14 14:38:11 2026 +0200
+++ b/trytond/trytond/ir/cron.py        Fri Oct 16 10:52:57 2026 +0200
@@ -100,6 +100,7 @@
             ('ir.filestore.queue|remove', "Remove Deleted Binaries"),
             ('ir.model|refresh_materialized', "Refresh Materialized Models"),
             ], "Method", required=True, states=_states)
+    method_string = method.translated('method')
 
     logs = fields.One2Many(
         'ir.cron.log', 'cron', "Logs", readonly=True, order=[('id', 'DESC')])
@@ -155,6 +156,9 @@
                     (i, True) for i in ids if i not in not_running)
         return running
 
+    def get_rec_name(self, name):
+        return f'{self.method_string} ({self.id})'
+
     @classmethod
     def notifications(cls):
         "Yield method and label which support user notification"

Reply via email to