-->

odoo 9 - how to restrict one2many to not show a fo

2019-07-09 23:09发布

问题:

I have a many2many, which is using the one2many widget.

I set mode="tree" and am using editable="bottom".

This works as expected in edit mode, however when in view mode - if the user clicks on a line it opens the line in a form view - how do i prevent this?

I either want nothing to happen, or to allow user to click on one of the _id items on the line.

Either way, clicking on the line should not open the record in a form view.

<field name="test_ids" widget="one2many" nolabel="1" mode="tree">
    <tree editable="bottom">
        <field name="partner_id"/>
        <field name="another_field"/>
    </tree>
</field>