Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1846 Представления

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?

Аватар
Отменить
Автор

Solved just need to replace code:

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

Works fine.

Related Posts Ответы Просмотры Активность
2
июл. 24
2562
1
июн. 24
5021
1
окт. 23
10705
1
окт. 23
98
1
авг. 23
2193