Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5699 Lượt xem

Hi everybody,

I use Odoo 9 with the mass mailing module. Right now I am using templates based on Jinja2 but now I want to switch to qweb for my email templates. 

I already installed the Module "QWeb for email templates" (https://www.odoo.com/apps/modules/9.0/email_template_qweb/).

The description of this module says: 

To use this module, you need to:

1. Select QWeb in the field Body templating engine

2. Select a QWeb view to be used to render the body field

3. Apart from QWeb's standard variables, you also have access to object and email_template, which are browse records of the current object and the email template in use, respectively.


The first one is easy. Under "Setting -> Technical settings -> email -> templates" I already created a email template and there I can use qweb code. The preview of this template shows that qweb is working correctly.

But I don't understand the second point. Where can I change the rendering engine for the email creation of the mass mailing module. If I create a mass mailing email I can not use qweb - only ninja2.

Thank you in advance for your help.

Best regards
Christoph

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I've been fixing it for version 8. But it should work for 9 as well. You might need to migrate the onchange() to API 8 though:

https://github.com/a0c/social/commit/fbaafc4f788ac8981f6ce5e0764c22d5f9e68747

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 4 20
2847
0
thg 1 20
3457
3
thg 8 18
10524
5
thg 11 24
46863
0
thg 8 24
970