Note that there are some explanatory texts on larger screens.

plurals
  1. POShow values of one2many in tree
    primarykey
    data
    text
    <p>I have a tree table inside of another tree table. When I'm editing, the nested table is properly shown inside of the cell. But when I just view the values, there are just comma separated ids in the cell (instead of the nested table). How can I display the table in the cell or at least formatted values in the view mode?</p> <p>Nested table:</p> <pre><code>&lt;record id="view_mrp_repair_line_item_tree" model="ir.ui.view"&gt; &lt;field name="name"&gt;mrp.repair.line.item.tree&lt;/field&gt; &lt;field name="model"&gt;mrp.repair.line.item&lt;/field&gt; &lt;field name="type"&gt;tree&lt;/field&gt; &lt;field name="arch" type="xml"&gt; &lt;tree string="Repair line items" editable="bottom"&gt; &lt;field name="description" /&gt; &lt;field name="price" /&gt; &lt;/tree&gt; &lt;/field&gt; &lt;/record&gt; </code></pre> <p>The parent table:</p> <pre><code>&lt;field colspan="4" mode="tree" name="operations" nolabel="1" widget="one2many_list"&gt; &lt;tree string="Operations" editable="bottom"&gt; ... &lt;field name="items" context="{'default_repair_line_id':active_id}" widget="one2many_list" /&gt; &lt;/tree&gt; &lt;/field&gt; </code></pre> <p>Model from nested table:</p> <pre><code>class mrp_repair_line_item(osv.osv): _name = 'mrp.repair.line.item' _columns = { 'repair_line_id': fields.many2one('mrp.repair.line', 'Repair Line', required=True), 'description': fields.char('Description', required=False, size=160), 'price': fields.float('Price', required=False) } mrp_repair_line_item() </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload