Odoo Help

3

1
4 Answers
12
Andre de Kock South Africa
6/14/15, 8:28 AM

Try to disable it in the tree view. Like this:

<tree create="false">
    <!-- Fields -->
</tree>

The create="false" attribute will hide the "Add an item" action on the one2many / many2many view.

5
Avatar

Zbik Poland

--Zbik--
12755
| 7 6 9
Łódź, Poland
--Zbik--


Zbik Poland
6/14/15, 11:45 AM

Thank Andre for your very helpful suggestion. Below full solution:

I replace:

 <field name="route_new_ids" widget="many2many" domain="[('product_id','=',id)]"/>

by:

 <field name="route_new_ids" domain="[('product_id','=',id)]" context="{'from_product': True}">
<tree create="false" delete="false">
  <field name="sequence" widget="handle"/>
  <field name="route_id"/>
</tree>
</field>


context="{'from_product': True}" allows to disable, after click on list position, in form view, editions other fields than sequence


1 Comment
Limitless Virtual Enterprise, Andre de Kock South Africa
6/15/15, 4:41 AM

Great! Glad I could help

3
Narendran India
5/24/16, 1:31 AM

options="{'no_create_edit': True}"

specify this in your many2many field,

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

Ask a Question
Writer
12755
Zbik
Keep Informed
1 follower(s)
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