Is it possible to change the sender address for all emails sent via chatter of a certain model? If so, how can I do it?
Bu soru işaretlendi
1
Cevapla
4676
Görünümler
Fixed:
class TheModel(models.Model):
...
_inherit = ['mail.thread', 'mail.activity.mixin']
...
@api.multi
@api.returns('self', lambda value: value.id)
def message_post(self, body='', subject=None, message_type='notification', **kwargs):
kwargs['email_from'] = "REALMAIL <realmail@domain.com>"
return super(TheModel, self).message_post(body, subject, message_type, **kwargs)
Tartışma hoşunuza mı gidiyor? Sadece okumakla kalmayın, katılın!
Özel özelliklerden yararlanmak ve harika topluluğumuzla etkileşime geçmek için bugün bir hesap oluşturun!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
|
3
Tem 21
|
11519 | ||
|
|
0
Nis 21
|
3494 | ||
|
|
1
Haz 19
|
5798 | ||
|
|
1
Ağu 25
|
5398 | ||
|
|
1
Mar 25
|
3431 |