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?
Esta pergunta foi sinalizada
1
Responder
4677
Visualizações
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)
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscrever-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
|
3
jul. 21
|
11520 | ||
|
|
0
abr. 21
|
3496 | ||
|
|
1
jun. 19
|
5805 | ||
|
|
1
ago. 25
|
5398 | ||
|
|
1
mar. 25
|
3432 |