Convert to boolean the readonly state of the "Process" button on the inbound email

Closes #14700
(grafted from ffe40330e3f6567fbd03e3139d7ff7580d342b4c)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2026-03-21 09:21:43 +01:00
parent ab71734228
commit e00c2b99bf
+2 -2
View File
@@ -14,7 +14,7 @@ from functools import partial
from trytond.config import config
from trytond.model import ModelSQL, ModelView, fields, sequence_ordered
from trytond.pool import Pool
from trytond.pyson import Eval
from trytond.pyson import Bool, Eval
from trytond.transaction import Transaction
from trytond.url import http_host
@@ -131,7 +131,7 @@ class Email(ModelSQL, ModelView):
cls._order = [('id', 'DESC')]
cls._buttons.update(
process={
'readonly': Eval('rule'),
'readonly': Bool(Eval('rule')),
'depends': ['rule'],
},
)