Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2825 Lượt xem
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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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("'","") }
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 25
595
3
thg 9 25
2376
2
thg 10 25
680
1
thg 8 25
2104
1
thg 5 25
1753