تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
5893 أدوات العرض

Hello,

I'm trying to use a HTML fied to display a specific tab.


In this tab I want to print a checkbox (not modifiable):

<div class="o_field_boolean o_field_widget custom-control custom-checkbox">
    <input type="checkbox" id="checkbox-{id_line}" disabled="">
</div>

But in the result, I have my tab with all my others values but for the checkbox nothing is displayed. When I inspect the element there is only the div with nothing inside:

<div class="o_field_boolean o_field_widget custom-control custom-checkbox">

</div>

How can I display a checkbox in a HTML field ?


الصورة الرمزية
إهمال
أفضل إجابة

Hello Theo,

I have copy and pasted your code into the website view and after putting the backslash at the end of the input tag everything seems to work as expected. 

<input type="checkbox" id="checkbox-{id_line}" disabled=""/>
I hope this helps,

Thanks, 

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Hello,

Thanks for the answer,

It works when I add that in the elements view of the browser but when I add in the xml view it doesn't show up in the html then (after module upgrade).

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 21
12029
1
يونيو 25
15264
3
أبريل 25
5387
Compute Fields تم الحل
2
يوليو 24
2288