From bcfda5f922828d303051d9eea7a7b332a6caf0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 10 Feb 2026 17:53:53 +0100 Subject: [PATCH] Show email buttons of marketing record activity when the state is done The email is sent only when the record activity is in the state done so the buttons must not be available in any other state. Closes #14597 (grafted from 00f2a2cdb0922e262410c7da835c75cf15e458c2) --HG-- branch : 6.0 --- modules/marketing_automation/marketing_automation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/marketing_automation/marketing_automation.py b/modules/marketing_automation/marketing_automation.py index ef99bb2894..b5a2177626 100644 --- a/modules/marketing_automation/marketing_automation.py +++ b/modules/marketing_automation/marketing_automation.py @@ -769,13 +769,13 @@ class RecordActivity(Workflow, ModelSQL, ModelView): )) cls._buttons.update( on_email_opened={ - 'invisible': ((Eval('state') != 'waiting') + 'invisible': ((Eval('state') != 'done') | (Eval('activity_action') != 'send_email') | Eval('email_opened', False)), 'depends': ['state', 'activity_action', 'email_opened'], }, on_email_clicked={ - 'invisible': ((Eval('state') != 'waiting') + 'invisible': ((Eval('state') != 'done') | (Eval('activity_action') != 'send_email') | Eval('email_clicked', False)), 'depends': ['state', 'activity_action', 'email_clicked'],