Replace marketing_email_token with issue12349.diff.

This commit is contained in:
Albert Cervera i Areny 2023-06-25 12:09:40 +02:00
parent 50b9a2855d
commit 78d50f27b9
1 changed files with 15 additions and 0 deletions

15
issue12349.diff Normal file
View File

@ -0,0 +1,15 @@
--- a/tryton/modules/marketing_email/marketing.py
+++ b/tryton/modules/marketing_email/marketing.py
@@ -137,6 +137,11 @@
@classmethod
def create(cls, vlist):
+ vlist = [v.copy() for v in vlist]
+ for values in vlist:
+ # Ensure to get a different token for each record
+ # default methods are called only once
+ values.setdefault('email_token', cls.default_email_token())
records = super().create(vlist)
cls._format_email(records)
return records