0
votes

In Odoo 12, I've defined a form containing a One2many field.

<field name="child_ids">
  <tree>
     <field name="child_attr"/>
  </tree>
</field>

In both models (parent and child), all fields are defined as readonly=True. Clicking on a line of child_ids's list yields a popup, a behavior I'd like to suppress.

So far I have tried, in all possible combinations, to no avail:

  • adding create="false" edit="false" editable="bottom" to the <tree> tag (and some variations)
  • adding options="{'no_create': True, 'no_open': True}" to the <field> tag
  • creating an extra ir.actions.act_window for child_ids's model that includes only tree as view_mode
  • creating an empty form definition for child_ids's model (this opens an empty popup)

What am I missing?

1

1 Answers

0
votes

I guess You have only created the tree view means form view used is default view meaning options="{'no_open': True}" is not for the form view make form view also and add options="{'no_open': True}" as you yourself suggested and it should work