Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3487 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 24
1583
Mail Notification : Customize the text แก้ไขแล้ว
2
พ.ย. 23
7216
0
ก.พ. 23
1760
9
ธ.ค. 22
24154
4
ก.ค. 25
6805