En effet je voudrais permettre à chaque utilisateur de notre ERP de n'avoir accès qu'à ses propres contacts. Et aussi qu'il y ai un super-utilisateur qui lui verra tous...
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Hi,
Users are only able to see their Contacts by using the Record rule:
Here the corresponding partner field refers to the user, so we can connect the user id with this field in the model. You can replace the 'related_partner' field with the res.partner field of this model.
<record id="id_record_rule_for_user" model="ir.rule">
<field name="name">Only Own Records</field>
<field ref="model_[your_model_name]" name="model_id"/>
<field name="domain_force">[('
</field>
<field name="groups"
eval="[(4, ref('module_name.user_group_
</record>
Refer to this link:
https://www.cybrosys.com/odoo/odoo-books/odoo-16-development/security/record-rules/
Regards
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
paź 23
|
6082 | ||
|
3
wrz 23
|
2950 | ||
|
0
maj 23
|
2929 | ||
|
1
kwi 23
|
2049 | ||
|
2
gru 19
|
41470 |