Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Best way to show employees all records, but portal users only their own?

By
Ron Arts
on 4/18/15, 11:58 PM 581 views

I have a model with a partner id in it. There is a list view accessible from a menu which also appears in the portal. What is the recommended way to show employees all records (and include a partner_id column), but portal users only their own records (hiding the partner_id column for them). 

@Jordi: thank you. Did not know it would be so easy. For portal users, how would I restrict the list to show only their records? Do I use filter_domain, domain, or force_domain?

Ron Arts
on 4/19/15, 11:22 AM

Sorry, I meant 'domain_force'. Something I found while grepping the odoo sources.

Ron Arts
on 4/19/15, 11:25 AM
2
Jordi Ballester Alomar
On 4/19/15, 12:13 AM

Hi Ron,

In that case you should make sure that the 'partner_id' field in your view definition has the the following attribute and value:

groups="base.group_user" 

This will restrict this field to appear only for employees.

Portal users belong to a group "Portal" that does not include the group "Employees".

Regards,

Jordi Ballester

www.eficent.com

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/18/15, 11:58 PM
Seen: 581 times
Last updated: 4/14/16, 3:26 AM