Odoo Help

0

Is it possible to use eval for invisble attribute?

By
René Schuster
on 7/4/14, 4:16 AM 1,337 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.(?)

Question:

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. (?)

 

Thanks.

1

Vasiliy Birukov

--Vasiliy Birukov--
3481
| 6 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
1

Leonardo Donelli

--Leonardo Donelli--
1060
| 5 4 8
Cave, 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.

Register

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)

Stats

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