跳至内容
菜单
此问题已终结
1 回复
2847 查看
Hello,
i want to send an Email on sale.order to 
partner_id.child_ids / All Child-Partners from that Contact with domain my_boolean = true

I'v added a new mailtemplate in odoo for that and added at email_to following code:

${object.partner_id.child_ids.filtered('my_boolean').mapped('email')}

Result (2 Contacts for testing matched):
['develop_1@mycompany.com', 'develop_2@mycompany.com']
Why and how could i solve that &#39 don't appear that i'm able to send the mails?

The Follower-System isn't working for that case.

Thanks a lot for your help


形象
丢弃
最佳答案

Real pain but I've just found the answer after having the same challenge!

${ str(object.mapped('partner_id.parent_id.child_ids.email') if object.partner_id.parent_id else object.mapped('partner_id.child_ids.email')).replace("'","") }
形象
丢弃
相关帖文 回复 查看 活动
2
10月 25
606
3
9月 25
2383
2
10月 25
682
1
8月 25
2106
1
5月 25
1760