<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="view_repair_order_calendar_form" model="ir.ui.view">
        <field name="name">repair.calendar.form</field>
        <field name="model">repair.order</field>
        <field name="inherit_id" ref="repair.view_repair_order_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='guarantee_limit']" position="after">
                <field name="date_repair"/>
                <field name="duration"/>
            </xpath>
            <xpath expr="//field[@name='partner_id']" position="after">
                <field name="user_id"/>
            </xpath>
        </field>
    </record>

    <record id="view_repair_order_calendar" model="ir.ui.view">
        <field name="name">Repair Orders Calendar</field>
        <field name="model">repair.order</field>
        <field name="arch" type="xml">
            <calendar string="Repair Orders Calendar" date_start="date_repair" date_delay="duration" color="user_id">
                <field name="product_id"/>
                <field name="partner_id"/>
            </calendar>
        </field>
    </record>

    <record id="repair.action_repair_order_tree" model="ir.actions.act_window">
        <field name="view_mode">tree,kanban,calendar,form</field>
    </record>

</odoo>
