Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
11481 Vizualizări

Hi guys, 

I have to eliminate the "Create/edit" option, at the quotation, when I select the customers field, the option let to the user create customers, But I need this option is disabled.


Thanks in advanced.


Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

For removing the create and edit option from the Many2one field,.what you can do is that, in the XML, along with the field give like this options="{'create': false, 'create_edit': false}"/>

This will remove the create and edit option from the many2one field.


  • create: true/false -> disable "create" entry in dropdown panel
  • create_edit: true/false -> disable "create and edit" entry in dropdown panel
  • limit: 10 (int) -> change number of selected record return in dropdown panel
  • m2o_dialog: true/false -> disable quick create M20Dialog triggered on error.

Example:

<field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false}"/>


Thanks

Imagine profil
Abandonează
Autor

Hi Niyas,

I used this code:

<field name="partner_id" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options="{&quot;always_reload&quot;: True, &quot;no_create_edit&quot;:true,&quot;no_create&quot;: true}"/>

Cel mai bun răspuns

pls refer to this help to see the best answer:

https://www.odoo.com/fr_FR/forum/aide-1/how-to-remove-create-and-edit-from-many2one-field-92242

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
dec. 19
4785
0
sept. 18
12007
2
aug. 25
2343
1
iul. 25
860
1
aug. 25
1150