如何更改odoo 11的默认删除图标

时间:2018-03-16 11:15:25

标签: odoo-11

我已经给出了可编辑的底部,所以我得到了odoo11的默认删除图标。但我想将它改为我的模块。如何将删除图标更改为我自己的模块?

 <field name="name"> Attachments</field>

 <field name="model">attachments</field>    

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

 <form string="Attachments">

 <field name="line_ids" >

    <tree string="Attachments" editable="bottom">

          <field name="description" />

           <field name="file_name" invisible="1" />

          <field name="upload_file" filename="file_name" />

            <button name ="download" icon ="gtk-go-down" type="object" />

       </tree>

    </field>

提前致谢!

2 个答案:

答案 0 :(得分:1)

只需在树状视图中添加delete="false"

<field name="name">Attachments</field>
<field name="model">attachments</field>    
<field name="arch" type="xml">
<form string="Attachments">
<field name="line_ids" >
    <tree string="Attachments" editable="bottom" delete="false">
      <field name="description" />
       <field name="file_name" invisible="1" />
       <field name="upload_file" filename="file_name" />
       <button name ="download" icon ="gtk-go-down" type="object" />
   </tree>
</field>

答案 1 :(得分:0)

您可以在树标记中添加 delete =&#34; false&#34; 恩。

{{1}}