问题
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>
来源:https://stackoverflow.com/questions/43930866/odoo-9-how-to-restrict-one2many-to-not-show-a-form-view