Skip to content
Snippets Groups Projects
hr_timesheet_view.xml 1.74 KiB
Newer Older
  • Learn to ignore specific revisions
  • <?xml version="1.0"?>
    <!-- Copyright 2020 Le Filament (<https://www.le-filament.com>)
         License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
    <odoo>
        <data>
            
            <record id="hr_timesheet_line_tree_no_create" model="ir.ui.view">
                <field name="name">account.analytic.line.tree.no.create.inherited</field>
                <field name="model">account.analytic.line</field>
                <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
                <field name="arch" type="xml">
                    <xpath expr="//field[@name='project_id']" position="attributes">
                        <attribute name="options">{'no_create': true, 'no_open': true,}</attribute>
                    </xpath>
                    <xpath expr="//field[@name='task_id']" position="attributes">
                        <attribute name="options">{'no_create': true, 'no_open': true,}</attribute>
                    </xpath>
                </field>
           </record>
    
           <record id="hr_timesheet_line_form_no_create" model="ir.ui.view">
                <field name="name">account.analytic.line.form.no.create.inherited</field>
                <field name="model">account.analytic.line</field>
                <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
                <field name="arch" type="xml">
                    <xpath expr="//field[@name='project_id']" position="attributes">
                        <attribute name="options">{'no_create': true, 'no_open': true,}</attribute>
                    </xpath>
                    <xpath expr="//field[@name='task_id']" position="attributes">
                        <attribute name="options">{'no_create': true, 'no_open': true,}</attribute>
                    </xpath>
                </field>
           </record>
           
       </data>
    </odoo>