Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
9793 Представления

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

Related Posts Ответы Просмотры Активность
0
мар. 25
734
0
янв. 25
2867
1
авг. 23
13831
change password Решено
1
авг. 23
12677
4
апр. 23
9812