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

Disable a view from custom module

By
aj
on 1/27/16, 2:00 PM 420 views

Hello.

I'm developing a custom module and need to disable a view from another module.

Manually view can be set inactive from: Settings->Technical->User Interface->Views. Then select the view and uncheck active checkbox.

What is the best way to do it?


Thanks.

1

Temur

--Temur--
2894
| 6 5 7
Tbilisi, Georgia
--Temur--
Programmer
Temur
On 1/28/16, 10:43 AM

One of options is to manipulate priority (sequence), you can add sequence to your view like this:

<record model="ir.ui.view" id="some_id">
<field name="name">some.name</field>
<field name="model">some.model</field>
<field eval="1" name="priority"/>

<field name="arch" type="xml"> . . . .


lower number of priority means higher priority. AFAIK it should not be negative, so Highest priority is 0 then. so if you set your view's priority to 0 or 1, then it'll become default one.

See documentation for "priority":

https://www.odoo.com/documentation/8.0/reference/views.html#common-structure

Thanks!

aj
on 2/29/16, 1:43 PM

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: 1/27/16, 2:00 PM
Seen: 420 times
Last updated: 2/29/16, 1:42 PM