Skip to Content
Menu
This question has been flagged
4 Replies
5927 Views

How to make a user see only reccord he has created, and admin user see all the reccord created by all users.

Avatar
Discard

Show Records that are related to active user: https://goo.gl/F42kRf

or use

Server Action: http://learnopenerp.blogspot.com/2020/01/odoo-server-action.html

Best Answer

As an example, check the access group “Sales / User: Own Documents Only” which has a Record Rule on Sales Orders (and Quotations) with this domain:

['|',
   ('user_id','=',user.id),
   ('user_id','=',False)
] 

This will only allow access to a user’s own orders / quotations (or any with no salesman (user_id) specified).  Then you need a second Record Rule to allow other users access to all quotations.

https://odootricks.tips/record-rules/

Avatar
Discard