for example.some snippet content in website should only visible for portal user only after login.other content should be public,and other should be only for admin user
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
Hi,
You could check the group of the user logged in in the snippet block.
Eg:
<t t-snippet=“module_name.snippet_template_name”
t-if=“request.env.user.has_group(‘base.group_portal’)” t-thumbnail=“thumbnail image link”/>
The above snippet block will only be available for portal user.
<t t-snippet=“module_name.snippet_template_name”
t-if=“request.env.user.has_group(‘base.user_admin’)” t-thumbnail=“thumbnail image link”/>
The above snippet block will be available for admin user
Regards
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
5
janv. 22
|
11546 | ||
|
3
mars 15
|
4390 | ||
|
1
mai 24
|
2049 | ||
|
0
août 23
|
2126 | ||
|
0
juin 20
|
2459 |