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?
This question has been flagged
1
Atsakyti
4681
Rodiniai
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)
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registracija| Related Posts | Replies | Rodiniai | Veikla | |
|---|---|---|---|---|
|
|
3
liep. 21
|
11531 | ||
|
|
0
bal. 21
|
3503 | ||
|
|
1
birž. 19
|
5807 | ||
|
|
1
rugp. 25
|
5400 | ||
|
|
1
kov. 25
|
3434 |