Odoo Help

0

How to disable a view using XML

By
Rui Franco
on 6/23/16, 9:19 AM 508 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.

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.

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