From b1a091fa02e372afe6b14b552d8d2078d35caa06 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 : 7.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 679b11324c..9b4fbf3aac 100644 --- a/modules/marketing_automation/marketing_automation.py +++ b/modules/marketing_automation/marketing_automation.py @@ -798,13 +798,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'],