Odoo Help


How to disable a view using XML

Rui Franco
on 6/23/16, 9:19 AM 724 views

This should be an easy one, yet...

I'm trying to disable a whole view. Naturally, I try to do the same thing i would do for menus, reports, etc.: I define a view using the same identifier as the original view and I only change the field I want...

<record id="hr_holidays.view_employee_form_leave_inherit" model="ir.ui.view">

    <field name="active" eval="0"/>


Unfortunately, this won't do the trick...

Any ideas, please?

I'm not a developer, but I would xpath to the main "div" of the view and replace it with nothing.

Ermin Trevisan
on 6/24/16, 12:16 AM
On 6/23/16, 10:16 AM

<field name="active" invisible="1" />

That would work if I were trying to hide a form field called "active".

I want to change the value of "active" in the view definition, so that it won't be taken into consideration by Odoo when loading views.

Rui Franco
on 6/23/16, 10:19 AM

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: 6/23/16, 9:19 AM
Seen: 724 times
Last updated: 6/23/16, 10:16 AM