تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
3410 أدوات العرض

In v16ce, I'm using an email template linked to an automation to send an email when when we change a field on Sales Orders. Currently the template email field is set to {{ object.partner_id.id }}. This only sends the email address associated with the customer. We'd like the email sent to all the stakeholders of a deal, i.e. the followers of the Sales Order. 


Is there an expression that would accomplish this? I've tried {{ object.message_follower_id.id }} with no success. Also, if there is more than one follower, would an expression still work of need a modifier? Suggestions would be greatly appreciated!

الصورة الرمزية
إهمال
أفضل إجابة

Hi ANRD: Put the following expression in the "To (Partners)" field in the template.

{{ str(object.message_partner_ids.ids)[1:-1] }}



الصورة الرمزية
إهمال
أفضل إجابة

I tried the answer from Paresh above and it worked for modyfing the helpdesk ticket ackowledgment email in V15 - the ackowledgment is now sent to customer as well as all the followers. Thank you Paresh!

Toni

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

Can you try like this inorder to loop through the stakeholders,

{% for follower in object.message_follower_ids %}

{{ follower.partner_id.email }},


{% endfor %}


Thanks

الصورة الرمزية
إهمال
الكاتب

Thanks for the reply! I was thinking that too. But the field seems to functioning more like a dynamic placeholder rather than a snippet. For "To (Emails): Comma separated recipient addresses" I've used {{ object.partner_id.id }} successfully but not longer expressions. Have you tried something like this and had it work?

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 23
2254
3
ديسمبر 19
16773
2
سبتمبر 25
9554
1
يونيو 25
1887
0
أبريل 16
4774