Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3468 Widoki

Hello,

in my email template the variables (i.e. context) is not rendered into the body_html.

The Template is:

 <odoo>
<data
noupdate="1">
<record
id="email_stuff" model="mail.template">
<field name="subject">Subject {{ ctx["stuff" }}</field>
<field name="auto_delete" eval="True" />
<field
name="model_id" ref="base.model_res_partner" />
<field
name="body_html">![CDATA[
Stuff is: {ctx["stuff"]}}

]]></field>
</record>
</data>
</odoo>

The mail is send and ctx["stuff"] (its content)
is shown in the subject as expected - but not in the body_html.  

There {{ ctx["stuff"] }} is printed out literally.

I tried with other variables (object.* etc.) nothing

Any ideas??


Thank you all,

--Holger



Awatar
Odrzuć
Autor Najlepsza odpowiedź

[Solved]

OK, i found it.

Type of "body_html" to "html" and then treat it as qweb. ( <t t-out="ctx['stuff'] />)

Thanks,

--Holger

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lut 24
2586
3
gru 23
19181
1
lut 22
6215
0
sie 21
2593
3
sie 20
6566