<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <record id="project_task_code_form_view" model="ir.ui.view">
        <field name="name">project.task.code.form</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_form2" />
        <field name="arch" type="xml">
            <field name="name" position="before">
                <field name="code" class="oe_inline" />
                <span class="oe_inline"> - </span>
            </field>
        </field>
    </record>
    <record id="project_task_code_tree_view" model="ir.ui.view">
        <field name="name">project.task.code.tree</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_tree2" />
        <field name="arch" type="xml">
            <field name="name" position="before">
                <field name="code" />
            </field>
        </field>
    </record>
    <record id="project_task_code_kanban_view" model="ir.ui.view">
        <field name="name">project.task.code.kanban</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_kanban" />
        <field name="arch" type="xml">
            <xpath
                expr="//strong[hasclass('o_kanban_record_title')]/t/field[@name='name']"
                position="before"
            >
                <span>[<field name="code" />] </span>
            </xpath>
            <xpath
                expr="//strong[hasclass('o_kanban_record_title')]/s/field[@name='name']"
                position="before"
            >
                <span>[<field name="code" />] </span>
            </xpath>
        </field>
    </record>
    <record id="project_task_code_search_view" model="ir.ui.view">
        <field name="name">project.task.code.search</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_search_form" />
        <field name="arch" type="xml">
            <field name="name" position="attributes">
                <attribute name="filter_domain">['|', ('name', 'ilike', self),
                    ('code', 'ilike', self)]
                </attribute>
            </field>
        </field>
    </record>
</odoo>
