コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
10323 ビュー

If I try to make a table for an email and use a loop in it:

<table>

<tr>

<th>Column1</th>

<th>Column1</th>

</tr>

% for comp in object.component_ids:

<tr>

<td>${data1}</td>

<td>${data2}</td>

</tr>

% endfor

</table>

And as soon as I save it, Odoo takes the % for and % endfor out of my table and puts them front of the <table>. Any idea why?


アバター
破棄
最善の回答

Change the widget_html to widget_text... it should works :)


It is because the browser auto correct the html... and it is no valid to have node text between <tr> tag


 

アバター
破棄

please can you explain where can you change the widget?

@Magen

Enable debug mode in setting, go to the view you want to update

At top right click on the bug icon -> edit form -> replace widget='html_frame' by widget='text" for the body field

関連投稿 返信 ビュー 活動
0
3月 25
1282
0
1月 25
3372
1
8月 23
14674
1
8月 23
13306
4
4月 23
10332