Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
1197 Lượt xem

Hello,

Any idea how to make the followers of a sales order or invoice visible to all the recipients. 

It´s happening that a follower is forwarding the email to another follower, since they don´t see all the recipients included in the loop.

Thanks,

Mireia

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

Hello,

I don´t use codes... can this be done with Studio?

Best,

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

code to get all followers' emails
---------------------------------

followers = self.env['mail.followers'].search([('res_model', '=', 'sale.order'), ('res_id', '=', sale_order_id)])

emails = [follower.partner_id.email for follower in followers]


Add these emails to the Cc field
----------------------------------

email_values = {

    'subject': 'Sales Order Notification',

    'email_to': main_recipient_email,

    'email_cc': ','.join(emails),

    # other email parameters

}


mail = self.env['mail.mail'].create(email_values)

mail.send()

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 19
4508
0
thg 4 21
2370
2
thg 10 23
8677
1
thg 5 19
5230
1
thg 3 19
5465