Odoo Help

0

Hide field in configuration view Openerp 7

By
Victor
on 8/27/14, 7:31 AM 1,627 views

Hello, I'm trying to hide a field that appears in configuration view inside of access permission tab.

I created a new group because I have 2 admin users, the original of openerp is the suprem and the second one is a admin with less privileges than the original one, and I joined this group to the original admin user.

I created this new group through of platform, not using code (xml)

This new group makes appear a new field in the view, but I only want this field appears for the original admin, not in other users (neither the second admin)

I tried to create a new rule but it doesn't work... object: res.groups
Rules I've tried:
[('user_id','=',1)]
[('uid','=',1)]
[('login','=','admin')]

I tried to modify the view and make invisible this field and this works but if I do a "update all" of my database, it restores the original view and the field appears again...

Somebody knows what I could do?

Thank you so much in advance.

0

odoo.ma by IBS Group

--odoo.ma by IBS Group--
1312
| 4 5 8
Tétouan, Morocco
--odoo.ma by IBS Group--

For more informations about IBS, please visit our website at www.ibs-na.com.

For a specific questions, collaboration or help, please send us an email to support@ibs-na.com

odoo.ma by IBS Group
On 8/27/14, 3:38 PM

Create a view that inherits the original view and change the attribute of the field you are trying to hide using xpath

This way even if you update, this data wont be lost.

Hello, thank you for you answers. I tried the option of xpath but it didn't work because the part that I want to hide, it isn't static, it changes depends on groups that are created... And I cannot to inherit this view... (res.users.groups -> if you preview this view, you see an structure but if you go to code it is completly different...) Is there any way to hide this group of view by using rules or something like that? Thank you!

Victor
on 8/28/14, 8:08 AM

Hello, finally it worked! :D I found exactly the path I needed to put in xpath. Thank you very much!

Victor
on 8/29/14, 5:05 AM

You are welcome :-)

odoo.ma by IBS Group
on 8/29/14, 7:07 AM
0

Ben Bernard

--Ben Bernard--
1083
| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 8/27/14, 10:32 PM

I tried to modify the view and make invisible this field and this works but if I do a "update all" of my database, it restores the original view and the field appears again...

Yes, this is expected result. One solution, the lazy version, is to update the xml file with the xml already in the database (the one you edited). Not the whole xml, but some content you already edited.

The recommended solution is, already mentioned by @IBS, to make new module to update the view.

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: 8/27/14, 7:31 AM
Seen: 1627 times
Last updated: 3/16/15, 8:10 AM