Odoo Help

Welcome!

This community 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.

3

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

By
Jeudy Nicolas
on 4/27/13, 1:13 PM 5,952 views

The Question has been closed

by
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">
    <form>
    <field name="name"/> ....
    </form>
</field>

and :

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

Any Idea ?

9

Jeudy Nicolas

--Jeudy Nicolas--
1181
| 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,

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

Hello, 

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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