Hello, I want to restrict access to certain records in Odoo based on the logged-in user’s group. How can I implement record rules? (using python)
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
1
Rispondi
317
Visualizzazioni
Hello,
Here is an example :
def _filter_access(self):
if self.env.user.has_group('module.group'):
return [('user_id', '=', self.env.uid)]
return []
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!
Registrati