Odoo Help


how to invisble a notebook page only for specific users?

aneesh ATEES Infomedia Pvt Ltd
on 9/3/15, 2:44 AM 981 views

i want to invisible inventory procurements sales variants from the product page for  the portal user.how to solve it


Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 9/3/15, 3:37 AM

Hello Aneesh,

In xml, you cannot hide the page using any condition or attrs.

For that, you can override fields_view_get and add the `invisible="1"` attribute on your page on a specific condition(s).


from lxml import etree

def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): if context is None: context = {} res = super(class_name, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu) doc = etree.XML(res['arch']) for node in doc.xpath("//page[@string='My Page']"): if uid in [1, 2, 3]: #ID of the users for whom page should be invisible node.set('invisible', "1") res['arch'] = etree.tostring(doc) return res
Hope this will help you.

Good replay..@ Sudhir Arya

Ankit H Gandhi(AHG)
on 9/13/15, 9:35 AM

Thank you Ankit for the compliment.

Sudhir Arya (ERP Harbor Consulting Services)
on 9/14/15, 4:57 AM

Whoever did flag Sudhir's answer should refrain from doing so! Flagging a post means giving -100 karma points and marking the post as flagged for the moderators.

Ermin Trevisan
on 2/15/17, 3:10 PM
Juan Muñoz
On 9/7/15, 4:23 AM

Maybe you can add any Group in your XML.

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: 9/3/15, 2:44 AM
Seen: 981 times
Last updated: 9/12/15, 3:53 AM