İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
8927 Görünümler

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

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç

How can it be editable having non-clickable?

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