<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="view_report_asset_register_tree" model="ir.ui.view">
        <field name="name">report_asset_register.tree</field>
        <field name="model">report_asset_register</field>
        <field name="arch" type="xml">
            <tree>
                <field name="start_date"/>
                <field name="end_date"/>
                <field name="category_ids" widget="many2many_tags"/>
            </tree>
        </field>
    </record>

    <record id="view_report_asset_register_form" model="ir.ui.view">
        <field name="name">report_asset_register.form</field>
        <field name="model">report_asset_register</field>
        <field name="arch" type="xml">
            <form>
                <header>
                    <button name="compute_data_for_report" string="Compute" type="object"/>
                </header>
                <sheet>
                    <group>
                        <group>
                            <field name="start_date" required="1"/>
                            <field name="end_date" required="1"/>
                        </group>
                        <group>
                            <field name="category_ids" widget="many2many_tags" required="1"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Depreciations">
                            <field name="depreciation_ids" readonly="1">
                                <tree>
                                    <field name="asset_id"/>
                                    <field name="date"/>
                                    <field name="amount"/>
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>

    <record id="act_report_asset_register" model="ir.actions.act_window">
        <field name="name">Asset Register</field>
        <field name="res_model">report_asset_register</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="view_id" ref="view_report_asset_register_tree"/>
    </record>


</odoo>