<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2018 ACSONE SA/NV
Copyright 2018-2019 Brainbean Apps (https://brainbeanapps.com)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
    <record model="ir.ui.view" id="hr_timesheet_line_form">
        <field name="name">account.analytic.line.view.form</field>
        <field name="model">account.analytic.line</field>
        <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form" />
        <field name="arch" type="xml">
            <field name="task_id" position="before">
                <field name="is_task_required" invisible="1" />
            </field>
            <field name="task_id" position="attributes">
                <attribute
                    name="attrs"
                >{'required':[('is_task_required','=',True)]}</attribute>
            </field>
        </field>
    </record>
    <record model="ir.ui.view" id="account_analytic_line_tree">
        <field name="name">account.analytic.line.view.tree</field>
        <field name="model">account.analytic.line</field>
        <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
        <field name="arch" type="xml">
            <field name="task_id" position="before">
                <field name="is_task_required" invisible="1" />
            </field>
            <field name="task_id" position="attributes">
                <attribute
                    name="attrs"
                >{'required':[('is_task_required','=',True)]}</attribute>
            </field>
        </field>
    </record>
</odoo>
