Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5012 มุมมอง

I have a html field in my form. When i try to edit my record this HTML field is automatically focused first.

Here is my code:

In .py file

description = fields.Html(string="Description")

and in xml file

<label for="description"/>
<field name="description" widget="html"/>

I have tried to remove the auto focus by the following:

<label for="description"/>
<field name="description" widget="html" tabindex="-1"/>
Still i didn't get any solution.
อวตาร
ละทิ้ง

Did you add this field in the first position of the form ?

ผู้เขียน

No. I have given in the middle.

and i have given takefocus=0 attribute in .py file, and its worked in my local. But when its in server its not working

I have tested the same in the odoo runbot, by adding a HTML field in the middle of the page and when clicking the edit button still the focus is on the first field

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.พ. 21
2611
3
พ.ค. 22
9114
0
เม.ย. 18
7659
0
ก.ค. 17
2820
0
มี.ค. 15
6399