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

How to display something to people not in a group?

By
Alex Malone
on 6/4/13, 1:22 PM 562 views

Hi folks,

So, I have been playing with permissions in my system and have a question regarding groups. It is quite common for me to hide fields so that only members of certain groups can see the field. The code looks like this:

<field name="hidden_field" groups="group_account_admin" />

As you are aware, this code means that only members of the group "group_account_admin" can view the field "hidden_field".

What I would like to know is what the inverse of this might be? So, what I want to do is if you are a member of the group, show one thing, otherwise show something else.

Does anyone know how I might achieve this? I'm thinking something like the following:

<field name="hidden_field" groups="group_account_admin" />
<label string="You do not have access to this" groups!="group_account_admin" />

Many thanks,

-Alex

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

0 follower(s)

Stats

Asked: 6/4/13, 1:22 PM
Seen: 562 times
Last updated: 3/16/15, 8:10 AM