Skip to content
Snippets Groups Projects
hr_timesheet_view.xml 1.88 KiB
Newer Older
  • Learn to ignore specific revisions
  • Rémi - Le Filament's avatar
    Rémi - Le Filament committed
    <?xml version="1.0" ?>
    
    Rémi - Le Filament's avatar
    Rémi - Le Filament committed
    <!-- Copyright 2020- Le Filament (https://le-filament.com)
    
         License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
    <odoo>
    
    
    Rémi - Le Filament's avatar
    Rémi - Le Filament committed
        <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="//tree" position="attributes">
                    <attribute name="editable">top</attribute>
                </xpath>
    
    Rémi - Le Filament's avatar
    Rémi - Le Filament committed
                <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>
    
    
    </odoo>