Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
7551 Visualizações

Hi

In Odoo 10, the default notification email template, is called "Notification Email", it has the xml ID "mail.mail_template_data_notification_email_default", and it's customisable in Settings/Email/Templates. It's written in Mako.

Good.

But for project.task related notifictions, I would like to use a whole new different template, rather than customise "Notification Email".

What should I override in Class project.task views or models to be able to specify another Email Template to use ?


I did find a very interesting piece of code in mail/models/res_partner.py :

       # existing custom notification email                                                                                     

base_template = None

        if message.model and self._context.get('custom_layout', False):

    base_template = self.env.ref(self._context['custom_layout'], raise_if_not_found=False)

        if not base_template:

            base_template = self.env.ref('mail.mail_template_data_notification_email_default')


base_template_ctx = self._notify_prepare_template_context(message)

        if not user_signature:

            base_template_ctx['signature'] = False

        base_mail_values = self._notify_prepare_email_values(message)

But I don't now where I should set this context inside project.task.

Somebody knows?


Avatar
Cancelar
Melhor resposta

Hello

Did you find a solution for this?

Thanks

René

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
ago. 22
7472
1
set. 17
14765
0
out. 16
5114
3
ago. 17
6987
2
jan. 24
4405