如何在Odoo的看板视图中移除“存档记录”。

huangapple go评论51阅读模式
英文:

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

如何在Odoo的看板视图中移除“存档记录”。

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?

答案1

得分: 3

您可以通过覆盖KanbanView.Group的qweb模板来删除Odoo 11.0中的Archive RecordRestore Records

在您的自定义模块中,您将在/static/src/xml/下创建一个xml文件(例如:kanban.xml),并将以下xml粘贴到其中。

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

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

然后在__manifest__.py中添加以下内容:

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

这将移除所有看板视图中的这两个选项。

英文:

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

huangapple
  • 本文由 发表于 2023年1月9日 12:50:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/75053295.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定