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?
To pytanie dostało ostrzeżenie
1
Odpowiedz
4618
Widoki
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)
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
|
3
lip 21
|
11507 | ||
|
|
0
kwi 21
|
3462 | ||
|
|
1
cze 19
|
5781 | ||
|
|
1
sie 25
|
5315 | ||
|
oe_chatter is loading very slow. Please help
Rozwiązane
|
|
1
mar 25
|
3370 |