Odoo Help

0

How to prohibit new record creation inside 'Add' (Select) tree view of a many2many field?

By
Anton Chepurov
on 6/1/14, 3:55 PM 1,990 views

On a form view with a Many2Many field, I'd like users to be able to Add existing records to M2M field, but not Create new records.

In other words, when we hit the 'Add' button to add objects to M2M field, there is a 'Create' button in addition to 'Select' button, on the form.

How do we remove this 'Create' button from the 'Add' (Select) view?

0

Nehal

--Nehal--
2108
| 5 2 8
Ahmadabad, India
--Nehal--
Nehal
On 6/2/14, 4:18 AM

Hi,

Following link may help you:
https://www.odoo.com/forum/Help-1/question/can-we-hide-createedit-button-of-form-view-16340

0
Anton Chepurov
On 6/2/14, 5:37 AM

Nehal,
unfortunately, it doesn't help much, as in my case a tree view is concerned, not the form view.

Luis Filipe,
users should still be able to add existing entries, but not the new ones. I was talking about prohibiting CREATION, not prohibiting ADDITION.

0

Hi, in the page definition of your view try this:

                            <page string="Tracing">
                                <field name="tracing_ids">
                                    <tree delete="false" create="false" >
                                        <field name="change_date" />
                                        <field name="executor" />
                                        <field name="state" />
                                        <field name="assigned_to" />
                                    </tree>
                                </field>                            
                            </page>

With the attributes create="false", users won't be able to add new entries. and the delete="false" they won't be able to delete them either.

I hope this is what you wanted.

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.

Register

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

1 follower(s)

Stats

Asked: 6/1/14, 3:55 PM
Seen: 1990 times
Last updated: 3/16/15, 8:10 AM