简体   繁体   中英

How to remove " Archive Record " from Kanban view in Odoo

I want to remove the " Archive Record " or " Restore Records " from kanban view settings see the screenshort

在此处输入图像描述

Select any Group By then Settings button then you will see this three options. Fold, Archive Records,Restore Record . Is there any way to remove these options?

You can remove Archive Record and Restore Records in Odoo 11.0 by override KanbanView.Group qweb template.

In your custom module, you will create xml file (for example: kanban.xml) under /static/src/xml/ and you will pate the below xml inside it.

<templates>
    <t t-extend="KanbanView.Group">
        <t t-jquery="t[t-if='widget.has_active_field']" t-operation="replace">

        </t>
    </t>
</templates>

Then in the __manifest__.py you will add the below:

'qweb': [
        `static/src/xml/kanban.xml`,
    ],

This will remove these two options for all Kanban views

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM