Just an example: An employee have some private information. An employee can see his own private information. But should not see other employee private information. In that case we can use attrs = "{'invisible': []}". It can invisible from view. But it's not secure. it's actually eye wash. if we inspect browser & go to Network-> XHR-> read-> JSON response, got the other employee private information. it's the problem of odoo security. there have any other solution for form view of odoo. It'll be helpful for us.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
Hi,
Try like below.
<record id="hr_personal_rule" model="ir.rule">
<field name="name">Employee</field>
<field ref="hr.model_hr_employee" name="model_id"/>
<field name="domain_force">[('user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('group_name'))]"/>
</record>
if you want to show some fields in employee records to only a particular group of users, you can use the group attribute along with that field.
Regards
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
|
0
dic 24
|
670 | ||
|
0
apr 22
|
3504 | ||
|
0
mag 18
|
4287 | ||
V17 Tree, Form view
Risolto
|
|
1
mar 25
|
1282 | |
|
1
giu 24
|
2668 |