Odoo Help


How hide in m2o widget "Create and Edit..." line?

Vasiliy Birukov
on 2/21/13, 6:46 AM 4,234 views

Is there any option like:

options='{"no_open": True}'

but for hide "Create and Edit..." line?

--Ahmed M.Elmubarak--

Ahmed M.Elmubarak
On 6/20/13, 8:55 AM

you can make the widget = selection

<field name = "name" widget = "selection"/>

good answer.

on 6/20/13, 10:19 AM

It's sutable if small amount of records, but I have many records and need Search More... functionality.

Vasiliy Birukov
on 6/21/13, 2:40 AM

Hi, wowas... you can remove create and edit from (V.7) addons/web/static/src/js view_form.js , just comment the lines from 2939 to 2945, then create and edit will disappear. but it'll be for all of you modules..!

Ahmed M.Elmubarak
on 6/22/13, 9:57 AM

Maybe the 'base_optional_quick_create' module can be useful too: https://code.launchpad.net/~elbati/server-env-tools/adding_base_optional_quick_create_7 . This module allows to avoid to 'quick create' new records, through many2one fields, for a specific model. You can configure which models should allow 'quick create'. When specified, the 'quick create' option will always open the standard create form.

on 6/23/13, 5:19 AM



| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 6/20/13, 7:48 PM

simple use tags create and delete in your xml file


<field name="field_name" create="false" delete="false"/>

It don't work for many2one.

Vasiliy Birukov
on 6/21/13, 2:54 AM

Daniel Reis

--Daniel Reis--
| 7 8 9
Linda-a-Velha, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt

Daniel Reis
On 2/21/13, 7:04 AM

You could make it make it read-only, but that wouldn't allow you to edit lines:

<field name="myfield" readonly="1"/>

If you want it to be editable, but not able to add lines, the closest thing it to change the Access Rights on the related table so that the user has Write Access but no Create Access.

Need have Full Access for related table, because this field in the same object for choose parent instance. But need restrict create parent instance because it does not make sense (in my context).

Vasiliy Birukov
on 2/22/13, 12:29 AM

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

2 follower(s)


Asked: 2/21/13, 6:46 AM
Seen: 4234 times
Last updated: 3/27/15, 5:31 PM