Odoo Help


How to choose form view used by many2one field in OpenERP V7 ? [Closed]

Jeudy Nicolas
on 4/27/13, 1:13 PM 7,188 views

The Question has been closed

Jeudy Nicolas
on 07/23/2013 13:39:27

Hi all,

I would like to select a particular form (with context or something like that) to edit many2one entry of an object.

For example, I have a many2one field partner_id that is link to res.partner, and I want to edit this entry in a simple form (name, phone, email) and not have all standard form.

I try :

<field name="partner_id">
    <field name="name"/> ....

and :

<field name="partner_id" context="{'ref_form_view': view_id_of_my_form}"/>

Any Idea ?


Jeudy Nicolas

--Jeudy Nicolas--

| 6 7 8
Pelousey, France
--Jeudy Nicolas--

- Linux administrator - Functional guy with OpenERP - Python, html, css, javascript developer OpenERP Ready Partner

Jeudy Nicolas
On 4/27/13, 1:23 PM

Ok I find it:

<field name="partner" context="{'form_view_ref':'mymodule.my_xmlid_partner_form'}"/>

you have to pass mymodule.xmlid_name_of_view, else it does not work. Think it should be helfull for others,

Aristóbulo Meneses
On 1/26/15, 5:35 AM


I'm trying to do the same but with res.users object, so this is my field

<field name="user_id" context="{'form_view_ref':'base.view_users_form'}"/>

But it doesn't load base.view_users_form it loads base.view_users_simple_form, any ideas?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/27/13, 1:13 PM
Seen: 7188 times
Last updated: 4/13/15, 5:46 AM