Skip to Content
Menu
This question has been flagged
1 Reply
1531 Views

Hi there,

I have a one2many on my sale.order model pointing to an new model with many2one pointing to sale.order. This works but... When I add field name ="this one2many field" I only see ID on my sale.order. I want to see specific fields form de new model.


Example:

Model sale.order has one2many field to custom model.

Custom model has many2one to sale.order.

Adding the following to sale.order view:

field name="custom field" does not show column header fields, also when using tree for instance.


Please help

Chris

Avatar
Discard

"Can't figure this out" is not a great title for a question. Readers need to open your question before they know if they can help. Can you imagine if every question posted "Can't figure this out"? Please use a question next time and provide enough detail in the summary so readers don't have to open your post to find out what you want.

Best Answer

Hi,

The reason behind viewing only ID in sale.order may be because you are adding only one2many field in view, you also need to add fields from new model inside tree.

Example

<  field name="one2many field name">
    <  tree>
      <  field name="custom field from new model"/>
     <  /tree>
 <  /field>

Regards

Avatar
Discard