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

Hi everyone,

Please I don't known how to filter the domain of a res.users field for a particular group users who I have only the odoo id (e.g. base.managing_users).

At the same time, what should I done to allow a user different of the administrator to get on a many2one field all the companies created in the database in the dropdown list.

Thks.

Imagine profil
Abandonează

you only need to filter out admin?

Cel mai bun răspuns

you can add filter either domain = [('id', '!=', SUPERUSER_ID)] or [('id','not in', [list of user_ids you need to filter out])]

Imagine profil
Abandonează
Autor

Maybe I haven't very well explain the problem. I have a field who is Many2one on the res.company model. When I'm connected with the admin privilege I get in the dropdown list of this field all the companies. But when I connect with another user privilege, I get only one company on the dropdown list of the same field. What can I done to get all companies on the dropdown list of the field in the both cases.

I have the same problem, did you ever find a solution?

Please check any record rule written for the user to filter out companies, if not then all companies will be displayed in default. If you need to add any filter, then use the suggested syntax by using fields in the model.

Related Posts Răspunsuri Vizualizări Activitate
2
sept. 23
3092
2
mar. 15
6139
1
mar. 25
1635
1
nov. 24
3940
2
aug. 24
15464