view_mail_attachment_custom.xml 1.77 KB
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_mail_attachment_custom_tree" model="ir.ui.view">
            <field name="name">mail.attachment.custom.tree</field>
            <field name="model">mail.attachment.custom</field>
            <field name="arch" type="xml">
                <tree>
                    <field name="active"/>
                    <field name="name"/>
                    <field name="create_uid"/>
                    <field name="create_date"/>
                    <field name="condition"/>
                </tree>
            </field>
        </record>
        <record id="view_mail_attachment_custom_form" model="ir.ui.view">
            <field name="name">mail.attachment.custom.form</field>
            <field name="model">mail.attachment.custom</field>
            <field name="arch" type="xml">
                <form>
                    <sheet>
                        <group>
                            <div class="oe_title">
                                <h1>
                                    <label class="oe_edit_only" for="name"/>
                                    <field name="name" placeholder="Name"/>
                                </h1>
                            </div>
                        </group>
                        <group>
                            <field name="active"/>
                            <field name="condition" placeholder="Eg: ${object.customer == True}"/>
                        </group>
                        <group string="Attachments">
                            <field name="attachment_ids" nolabel="1" widget="many2many_binary
"/>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>
    </data>
</openerp>