One2Many : How to to choose the displayed sub view?


#1

Hello !

When a one2many field is displayed in a form, witch attribute I should use to explicitly ask the client to render a view among the several defined for a same model ?
So far, I can only control witch type of view is displayed with the attribute ‘mode’.

Thank you for your help.


(Sergi Almacellas Abellana) #2

You should use theview_ids attribute of the field in order to define the ids of the views to be used.

You use the xml id (module.xml_record_id) in order to reference a view loaded from a module


#3

Herr, I completely missed this attribute.
Sorry for this dumb question. I souldn’t be allowed to post any question until 2019…


(Sergi Almacellas Abellana) #4

Don’t worry, we are here to help!

Just make the response as solution so the topic will be closed automatically :wink: