[ADD] hr_timesheet_work_entry: for Odoo 13

This commit is contained in:
Jared Kipe
2020-10-06 11:53:45 -07:00
committed by Leo Pinedo
parent 557e490427
commit 585933be34
11 changed files with 148 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="hr_timesheet_line_tree_inherit" model="ir.ui.view">
<field name="name">account.analytic.line.tree.hr_timesheet.inherit</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/field[@name='task_id']" position="after">
<field name="work_type_id"
domain="[('allow_timesheet', '=', True)]"
context="{'default_allow_timesheet': True}" />
</xpath>
</field>
</record>
<record id="hr_timesheet_line_form_inherit" model="ir.ui.view">
<field name="name">account.analytic.line.form.inherit</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='task_id']" position="after">
<field name="work_type_id"
domain="[('allow_timesheet', '=', True)]"
context="{'default_allow_timesheet': True}" />
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="hr_work_entry_type_view_form_inherit" model="ir.ui.view">
<field name="name">hr.work.type.view.form.inherit</field>
<field name="model">hr.work.entry.type</field>
<field name="inherit_id" ref="hr_work_entry.hr_work_entry_type_view_form"/>
<field name="arch" type="xml">
<xpath expr="//group/group" position="after">
<group name="timesheet" string="Timesheets">
<field name="allow_timesheet"/>
</group>
</xpath>
</field>
</record>
<menuitem
id="hr_work_entry_type_menu"
name="Work Entry Types"
parent="hr_timesheet.hr_timesheet_menu_configuration"
action="hr_work_entry.hr_work_entry_type_action"/>
</odoo>