ODOO
In this case we have many2one field for model that has more than one view and we want to open specific view from this field for this model
let us give an example :
- we have model "object.a" and model "object.b", in which we have object_a_id field as bellow
object_a_id = fields.Many2one('object.a', string="Object A")
- model "object.a" has two form view with ids "object_a_form_view_1" and "object_a_form_view_2" and "object_a_form_view_1" id the default view and we want to show the other view from object_a_id field , so we can do it by add the field in the xml file as bellow
<field name="object_a_id" context="{'form_view_ref':'module_name.object_a_form_view_2',}" />