Odoo Help


Is it possible to use eval for invisble attribute?

René Schuster
on 7/4/14, 4:16 AM 1,858 views

What I want to do:

Hide a page in a form view if its not the users own record, or the user is not in a given group.

What I've tried:

Using attrs to set the page invisble.

The Problem:

uid is not available in attrs.(?)


Can I use the eval expression to evaluate True or False for the invisible attribute directly, instead of using attrs?

What other suggestions?

Using groups would work to hide the page for groups, but this way, I can't make the page visible for the owner of the record. (?)




Vasiliy Birukov

--Vasiliy Birukov--
| 7 6 8
Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov
On 7/4/14, 9:50 AM

For your case you can define function filed, that will return your evaluation.

Make that field invisible.

With attrs control your PAGE through this field.


Thx for the reply. I've read about that solution before. I think it's ugly, but it will do if there are no alternatives.

René Schuster
on 7/7/14, 4:11 AM

Leonardo Donelli

--Leonardo Donelli--
| 5 4 8
Roma, Italy
--Leonardo Donelli--

Physics student and part-time developer.

Leonardo Donelli
On 7/4/14, 10:36 AM

See this answer and this launchpad bug discussion. From what I understand it is not supported and you'll have to write a function field that returns the uid, and use that.

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 7/4/14, 4:16 AM
Seen: 1858 times
Last updated: 3/16/15, 8:10 AM