Odoo Help

Welcome!

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

0

How to disable a view using XML

By
Odooveloper (by Rui Franco)
on 6/23/16, 9:19 AM 208 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"/>

</record>


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
0
wizardz
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.

Odooveloper (by Rui Franco)
on 6/23/16, 10:19 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/23/16, 9:19 AM
Seen: 208 times
Last updated: 6/23/16, 10:16 AM