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

Hi,

How can i make a one2many field non clickable in odoo.Even though i didnt define any form view for the one2many filed it raises a form when click on the field after saving.Any solution for this.

Thanks

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

Hi,

You can disable the form view of that one2many field by defining  style="pointer-events:none;".
For example you can refer the following code

<field name="line_ids"  style="pointer-events:none;">
<tree string="Lines" editable="bottom">
<field name="serial_no"/>
<field name="name"/>
<field name="category_id"/>
<field name="child_id"/>
</tree>
</field>

But after using this option you cant edit the field.

Refer https://stackoverflow.com/questions/51321569/how-to-restrict-disable-the-form-view-while-click-tree-view-of-one2many-field-i

Thanks

الصورة الرمزية
إهمال

How can it be editable having non-clickable?

@Kamrul: that's something contradictory, shouldn't be as like that