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.

2

Remove CREATE AND EDIT when populating many2many fields?

By
jamesbale
on 6/21/13, 4:57 AM 8,300 views

how to remove option create and edit from many2many fields? For example In the sale order line or invoice lines, there is tax ids, which is a many2many field using the widget='many2many_tags', I want to remove the create and edit form here. But need to create taxes from its tree and form view.

7
Maxim Litnitskiy
On 11/10/14, 3:03 PM

To disable creation / edition of tags in many2many_tags widget pass options dictionary with either no_create or no_create_edit set.

Example:

<field name='subscribers' options="{'no_create_edit': True}" widget='many2many_tags' />

Someone should accept this answer, as it is the right one now.

PY
on 11/12/15, 5:32 AM
1
Alexander
On 6/21/13, 5:19 AM

If you want to do it by view overriding, you can use xpath.

For example:

        <xpath expr="//tree[@string='Your Tree Name']" position="attributes">
            <attribute name="create">0</attribute>
                <attribute name="create">0</attribute>
                <attribute name="delete">0</attribute>
                <attribute name="edit">0</attribute>
        </xpath>

hello by doing as you describe it stop creation from tree view, i want stop creation and edit from population of m2m field.

jamesbale
on 6/21/13, 10:27 AM

What widget was used for displaying m2m field in your case?

Alexander
on 6/21/13, 11:18 AM

widget="many2many_tags"

jamesbale
on 6/25/13, 4:56 AM
0
Umesh Choudhari
On 3/7/16, 5:56 AM

options="{'no_create':True}"

0

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 11/15/13, 3:55 PM

hello,

I just update web_m2o_enhanced module to support many2manytags widget.

You can check and use it:

Github repository

For comment and description of how to user, you can read This help question

0
Wiebe de Roos
On 12/2/13, 3:58 AM

Nicolas,

Thank you very much. I already used yr module for o2m and I just needed it for many2many as well ;-)

Merci!

Wiebe

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 6/21/13, 4:57 AM
Seen: 8300 times
Last updated: 3/7/16, 6:08 AM