Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
13200 Visualizzazioni

Hi,

Working on Odoo13, when creating a new contact (individual) in debug mode there is a field where it let you chose direction type (private, delivery...).

How can grant permission to a specific group of users to this field?

Avatar
Abbandona
Risposta migliore

Hi, Kiko Rivera


groups="base.group_no_one"  is used for showing fields  only in debug mode
 
<field name="type" groups="base.group_no_one" attrs="{'invisible': [('is_company','=', True)], 'readonly': [('user_ids', '!=', [])]}"/>

If you want to  give access to any other groups assign multiple groups for that field ,

<field name="type" groups="base.group_no_one,base.user_admin" attrs="{'invisible': [('is_company','=', True)], 'readonly': [('user_ids', '!=', [])]}"/>
Avatar
Abbandona
Autore Risposta migliore

How can I identify all groups available in Odoo?

Avatar
Abbandona
Risposta migliore

Hello Kiko Rivera,

Yes, you can very well do this by assigning group to that particular field .

for reference, please consider this ...

<field name ="test" groups="group_name"/>

you can also define multiple group using comma
I hope you will understand this
Thank you....

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
ago 25
799
0
lug 25
524
1
lug 25
754
0
giu 25
662
1
mag 25
1316