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

Hi! I have a custom module in Odoo13 where I create a record and then, from the controller, I send a message to the user via message_post() method. Using this, I can see in the chatter a message and the user receives an email. This email has a header with the company logo and a link to the record. I didn't change any template or layout, this is normal behavior. But, if I go to the chatter and write the same message, in the chatter seems the same message but the user receives the email without that header with the logo and the link.

Is there any way to add this by default? I thought in some code which overwrites the default template with the mail.message_notification_email template, who has header and footer and seems is the one used when message_post() method. But I don't know which is the layout by default to overwrite.

I thought about something like that:

<template id="custom_mail_message_notification" inherit_id="mail.LAYOUT_BY_DEFAULT_IN_CHATTER">
    <xpath expr="//div[@class='email_template']" position="replace">
        <t t-call="mail.mail_notification_light">
            <t t-set="body">
                <div class="o_mail_message_body">
                    <t t-raw="message.body"/>
                </div>
            </t>
        </t>
    </xpath>
</template>

Anyone can help me? Thanks!

아바타
취소
관련 게시물 답글 화면 활동
0
1월 23
2360
1
5월 22
4284
1
4월 22
5531
0
9월 21
2287
0
6월 21
2676