details: https://code.tryton.org/tryton/commit/9c03845f092b
branch: 6.0
user: Cédric Krier <[email protected]>
date: Sat Jan 10 18:39:18 2026 +0100
description:
Test the record reference of marketing automation record before
execution
The reference field is on the record and not on the record activity.
Closes #14281
(grafted from a7bcd29273f4b7cc5d4d8ce8c1a5f86242ece361)
diffstat:
modules/marketing_automation/marketing_automation.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 99d810d21b26 -r 9c03845f092b
modules/marketing_automation/marketing_automation.py
--- a/modules/marketing_automation/marketing_automation.py Mon Dec 29
15:58:40 2025 +0100
+++ b/modules/marketing_automation/marketing_automation.py Sat Jan 10
18:39:18 2026 +0100
@@ -484,13 +484,13 @@
activity=self.rec_name,
exception=exception)) from exception
- def execute(self, activity, **kwargs):
+ def execute(self, record_activity, **kwargs):
pool = Pool()
RecordActivity = pool.get('marketing.automation.record.activity')
- record = activity.record
+ record = record_activity.record
# As it is a reference, the record may have been deleted
- if not record:
+ if not record.record:
return
# XXX: use domain
@@ -498,7 +498,7 @@
return
if self.action:
- getattr(self, 'execute_' + self.action)(activity, **kwargs)
+ getattr(self, 'execute_' + self.action)(record_activity, **kwargs)
RecordActivity.save([
RecordActivity.get(record, child)
for child in self.children])