我已经给出了可编辑的底部,所以我得到了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>
提前致谢!
答案 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}}