تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
7767 أدوات العرض

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.

الصورة الرمزية
إهمال
أفضل إجابة

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!

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
ديسمبر 18
4874
1
يوليو 23
3674
1
مايو 23
3621
0
أكتوبر 22
5186
1
سبتمبر 22
2749