콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3482 화면

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?

아바타
취소
작성자 베스트 답변

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)

아바타
취소
관련 게시물 답글 화면 활동
3
7월 21
9787
0
4월 21
2117
1
6월 19
4170
1
8월 25
3476
1
3월 25
2142