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

I wrote custom module to send an email to a sales team when new lead is created like this:


from odoo import models, fields, api

class Lead(models.Model):
    _inherit = 'crm.lead'

    @api.model
    def create(self, vals):
        record = super().create(vals)
        
        template_id = self.env.ref('custom_interface.new_signal').id
        if template_id:
            record.message_post_with_template(template_id)
        return record

And by doing this users from particular sales team get the email with automaticly attached buttons to manage and display the lead.

But I have two companies and two website on different domains. Unfortunetly users sometimes get email from wrong domain (users from Company B get emails with domain for Comapny A).


I think emails with that automatic header and buttons are composed by tamplate "mail.message_notification_email"

And there is a object called "button_access"


How do I make sure that they always get an email with urls from thier corresponding company domain?

Using Odoo13

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 24
1583
2
thg 11 23
7216
0
thg 2 23
1753
9
thg 12 22
24138
4
thg 7 25
6797