Files
tryton/trytond/ir/attachment.xml
T
Cédric Krier 57cf3835eb Use a Reference field on ir.attachment to store resource informations
Improve the ir.attachment views to be usable on the client side
2010-03-23 10:58:24 +01:00

67 lines
2.8 KiB
XML

<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="attachment_view_form">
<field name="model">ir.attachment</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Attachments" col="2">
<label name="resource"/>
<field name="resource"/>
<label name="name"/>
<field name="name"/>
<label name="datas"/>
<field name="datas"/>
<label name="link"/>
<field name="link" widget="url"/>
<notebook colspan="2">
<page string="Preview" name="preview" col="1">
<field name="datas" widget="image"/>
</page>
<page name="description" col="1">
<field name="description"/>
</page>
</notebook>
</form>
]]>
</field>
</record>
<record model="ir.ui.view" id="attachment_view_tree">
<field name="model">ir.attachment</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Attachments" fill="1">
<field name="resource" select="1"/>
<field name="name" select="1"/>
<field name="datas_size"/>
</tree>
]]>
</field>
</record>
<record model="ir.action.act_window" id="act_attachment_form">
<field name="name">Attachments</field>
<field name="type">ir.action.act_window</field>
<field name="res_model">ir.attachment</field>
<field name="view_type">form</field>
</record>
<record model="ir.action.act_window.view"
id="act_attachment_form_view1">
<field name="sequence" eval="1"/>
<field name="view" ref="attachment_view_tree"/>
<field name="act_window" ref="act_attachment_form"/>
</record>
<record model="ir.action.act_window.view"
id="act_attachment_form_view2">
<field name="sequence" eval="2"/>
<field name="view" ref="attachment_view_form"/>
<field name="act_window" ref="act_attachment_form"/>
</record>
<menuitem name="Attachments" parent="ir.menu_models"
action="act_attachment_form" id="menu_attachment_form"/>
</data>
</tryton>