콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
10295 화면

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
1276
0
1월 25
3343
1
8월 23
14639
change password 해결 완료
1
8월 23
13286
4
4월 23
10321