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

I have created a new model that refers to company_id and now i want to add restriction rule so user can only create and see only his company items. Is that possible to do? I've tried to write rule like this:
[( 'Raw_material_comp_id', '=', 'user.company_id.id')]
but after that all my items of "raw material" disappears and I can not create any new ones. Any help?

Avatar
Abbandona
Autore

Solved just need to replace code:

[('raw_material_comp_id','child_of',[user.company_id.id])] [CORRECT]

Works fine.

Post correlati Risposte Visualizzazioni Attività
2
lug 24
2683
1
giu 24
5145
1
ott 23
10853
1
ott 23
98
1
ago 23
2193