# Remove the create option in a many2one

**URL:** <https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688>\
**Category:** Developer\
**Created:** [October 8, 2021, 10:05am UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688 "2021-10-08T10:05:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacarias](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/zacarias/32/1634_2.png) [@zacarias](https://discuss.tryton.org/u/zacarias)\
**Post date:** [October 8, 2021, 10:05am UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688/1 "2021-10-08T10:05:04Z")

</div>

Hi everyone  
I am new to tryton and would like to know if it is possible to remove the create option in a many2one relationship.  
Thanks

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [October 8, 2021, 10:18am UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688/2 "2021-10-08T10:18:23Z")

</div>

The create option is activated only if the user has [access rights](https://docs.tryton.org/projects/server/en/latest/topics/access_rights.html#topics-access-rights) to create the target model.

If you want to deactivate such button you will need to remove the create access.

---

<div class="post-metadata">

**Author:** ![zacarias](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/zacarias/32/1634_2.png) [@zacarias](https://discuss.tryton.org/u/zacarias)\
**Post date:** [October 8, 2021, 10:28am UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688/3 "2021-10-08T10:28:10Z")

</div>

It is possible to deactivate only one model?

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [October 8, 2021, 10:40am UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688/4 "2021-10-08T10:40:45Z")

</div>

Yes, the access rights are specified for each model. So you can activate or deactivate them.  
Furthermore, you can relate access rights to a set of users, so depending on the grups of the user one may be able to create the records and others not.

---

<div class="post-metadata">

**Author:** ![zacarias](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/zacarias/32/1634_2.png) [@zacarias](https://discuss.tryton.org/u/zacarias)\
**Post date:** [October 8, 2021, 10:49am UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688/5 "2021-10-08T10:49:33Z")

</div>

Thanks for the explanation.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [October 8, 2021, 11:14am UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688/6 "2021-10-08T11:14:00Z")

</div>

You can set on the field the XML attribute `create="0"`

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [October 8, 2021, 1:28pm UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688/7 "2021-10-08T13:28:36Z")

</div>

Indeed the attribute is not yet allowed in the view until [Allow create/delete attribute (#10840) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue10840)

---

<div class="post-metadata">

**Author:** ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)\
**Post date:** [October 8, 2021, 4:22pm UTC](https://discuss.tryton.org/t/remove-the-create-option-in-a-many2one/4688/8 "2021-10-08T16:22:18Z")

</div>

You may also consider using:

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

```

So the selection widget is used instead of the m2o, although the latter is better for searching.
