<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="view_conditional_image_tree" model="ir.ui.view">
        <field name="name">conditional.image.tree</field>
        <field name="model">conditional.image</field>
        <field name="arch" type="xml">
            <tree>
                <field name="name" />
                <field name="model_name" />
                <field name="company_id" />
                <field name="selector" />
            </tree>
        </field>
    </record>

    <record id="view_conditional_image_form" model="ir.ui.view">
        <field name="name">conditional.image.form</field>
        <field name="model">conditional.image</field>
        <field name="arch" type="xml">
            <form string="Conditional Image">
                <group>
                    <group>
                        <field name="name" />
                        <field name="model_name" />
                        <field name="company_id" />
                    </group>
                    <group>
                        <field
                            name="image_1920"
                            widget='image'
                            class="oe_avatar"
                            options='{"preview_image": "image_1920"}'
                        />
                    </group>
                    <group string="Selector">
                        <field
                            name="selector"
                            nolabel="True"
                            widget="ace"
                            options="{'mode': 'python'}"
                        />
                    </group>
                </group>
            </form>
        </field>
    </record>

    <record id="conditional_image_action" model="ir.actions.act_window">
        <field name="name">Conditional Images</field>
        <field name="res_model">conditional.image</field>
        <field name="view_mode">tree,form</field>
    </record>

    <record model="ir.ui.menu" id="conditional_image_menu">
        <field name="name">Conditional Images</field>
        <field name="parent_id" ref="base.menu_ir_property" />
        <field name="action" ref="conditional_image_action" />
        <field name="sequence" eval="99" />
    </record>
</odoo>
