2018-01-16 06:58:15 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2018-01-16 11:34:37 +01:00
|
|
|
<flectra>
|
2018-01-16 06:58:15 +01:00
|
|
|
<data>
|
|
|
|
<record id="act_hr_timesheet_line_by_project" model="ir.actions.act_window">
|
|
|
|
<field name="name">Activities</field>
|
|
|
|
<field name="res_model">account.analytic.line</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_mode">tree,form</field>
|
|
|
|
<field name="view_id" ref="hr_timesheet_line_tree"/>
|
|
|
|
<field name="domain">[('project_id', '!=', False)]</field>
|
|
|
|
<field name="context">{"default_project_id": active_id, "search_default_project_id": [active_id]}</field>
|
|
|
|
<field name="search_view_id" ref="hr_timesheet_line_search"/>
|
|
|
|
<field name="help" type="html">
|
|
|
|
<p class="oe_view_nocontent_create">
|
|
|
|
Click to record activities.
|
|
|
|
</p><p>
|
|
|
|
You can register and track your workings hours by project every
|
|
|
|
day. Every time spent on a project will become a cost and can be re-invoiced to
|
|
|
|
customers if required.
|
|
|
|
</p>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="project_project_view_form_simplified_inherit_timesheet" model="ir.ui.view">
|
|
|
|
<field name="name">project.project.view.form.simplified.inherit.timesheet</field>
|
|
|
|
<field name="model">project.project</field>
|
|
|
|
<field name="inherit_id" ref="project.project_project_view_form_simplified"/>
|
|
|
|
<field name="priority">24</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<field name="user_id" position="after">
|
|
|
|
<field name="allow_timesheets"/>
|
|
|
|
</field>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="project_invoice_form" model="ir.ui.view">
|
|
|
|
<field name="name">Inherit project form : Invoicing Data</field>
|
|
|
|
<field name="model">project.project</field>
|
|
|
|
<field name="inherit_id" ref="project.edit_project"/>
|
|
|
|
<field name="priority">24</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<button name="toggle_active" position="before">
|
|
|
|
<button class="oe_stat_button" name="%(act_hr_timesheet_line_by_project)d" type="action" icon="fa-calendar" string="Timesheets" attrs="{'invisible': [('allow_timesheets', '=', False)]}" groups="hr_timesheet.group_hr_timesheet_user"/>
|
|
|
|
</button>
|
|
|
|
<xpath expr="//div[@name='options_active']" position="inside">
|
|
|
|
<div>
|
|
|
|
<field name="allow_timesheets" class="oe_inline" string="Allow timesheets"/>
|
|
|
|
<label for="allow_timesheets"/>
|
|
|
|
</div>
|
|
|
|
</xpath>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.ui.view" id="view_task_form2_inherited">
|
|
|
|
<field name="name">project.task.form.inherited</field>
|
|
|
|
<field name="model">project.task</field>
|
|
|
|
<field name="inherit_id" ref="project.view_task_form2" />
|
|
|
|
<field name="groups_id" eval="[(6,0, (ref('hr_timesheet.group_hr_timesheet_user'),))]"/>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<xpath expr="//notebook/page[@name='description_page']" position="after">
|
|
|
|
<page string="Timesheets" attrs="{'invisible': [('project_id', '=', False)]}">
|
|
|
|
<group>
|
|
|
|
<group>
|
|
|
|
<field name="planned_hours" widget="float_time"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="progress" widget="progressbar"/>
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
<field name="timesheet_ids" context="{'default_project_id': project_id}">
|
|
|
|
<tree editable="bottom" string="Timesheet Activities" default_order="date">
|
|
|
|
<field name="date"/>
|
|
|
|
<field name="user_id" invisible="1"/>
|
|
|
|
<field name="employee_id" required="1"/>
|
|
|
|
<field name="name"/>
|
|
|
|
<field name="unit_amount" string="Duration" widget="float_time"/>
|
|
|
|
<field name="project_id" invisible="1"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
<group>
|
|
|
|
<group class="oe_subtotal_footer oe_right" name="project_hours">
|
|
|
|
<field name="effective_hours" widget="float_time" />
|
|
|
|
<field name="children_hours" widget="float_time" attrs="{'invisible' : [('children_hours', '=', 0.0)]}" />
|
|
|
|
<field name="total_hours_spent" widget="float_time" class="oe_subtotal_footer_separator" attrs="{'invisible' : [('children_hours', '=', 0.0)]}" />
|
|
|
|
<field name="remaining_hours" widget="float_time" class="oe_subtotal_footer_separator" readonly="1"/>
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</page>
|
|
|
|
</xpath>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="view_task_tree2_inherited" model="ir.ui.view">
|
|
|
|
<field name="name">project.task.tree.inherited</field>
|
|
|
|
<field name="model">project.task</field>
|
|
|
|
<field name="inherit_id" ref="project.view_task_tree2" />
|
|
|
|
<field eval="2" name="priority"/>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<field name="user_id" position="after">
|
|
|
|
<field name="planned_hours"/>
|
|
|
|
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" readonly="1"/>
|
|
|
|
<field name="total_hours" invisible="1"/>
|
|
|
|
<field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/>
|
|
|
|
</field>
|
|
|
|
<field name="stage_id" position="after">
|
|
|
|
<field name="progress" widget="progressbar"/>
|
|
|
|
</field>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="view_project_kanban_inherited" model="ir.ui.view">
|
|
|
|
<field name="name">project.project.timesheet.kanban.inherited</field>
|
|
|
|
<field name="model">project.project</field>
|
|
|
|
<field name="inherit_id" ref="project.view_project_kanban"/>
|
|
|
|
<field name="priority">24</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<field name="partner_id" position="after">
|
|
|
|
<field name="allow_timesheets" invisible="1"/>
|
|
|
|
</field>
|
|
|
|
<xpath expr="//div[hasclass('o_kanban_manage_reports')]/div[last()]" position="after">
|
|
|
|
<div attrs="{'invisible': [('allow_timesheets', '=', False)]}" groups="hr_timesheet.group_hr_timesheet_user">
|
|
|
|
<a name="%(act_hr_timesheet_line_by_project)d" type="action">Timesheets</a>
|
|
|
|
</div>
|
|
|
|
</xpath>
|
|
|
|
<xpath expr="//div[hasclass('o_project_kanban_boxes')]" position="inside">
|
|
|
|
<a t-if="record.allow_timesheets.raw_value" class="o_project_kanban_box" name="%(act_hr_timesheet_line_by_project)d" type="action" groups="hr_timesheet.group_hr_timesheet_user">
|
|
|
|
<div>
|
|
|
|
<span class="o_label">Timesheets</span>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</xpath>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="view_task_kanban_inherited_progress" model="ir.ui.view">
|
|
|
|
<field name="name">project.task.timesheet.kanban.inherited.progress</field>
|
|
|
|
<field name="model">project.task</field>
|
|
|
|
<field name="inherit_id" ref="project.view_task_kanban"/>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<templates position="before">
|
|
|
|
<field name="progress" />
|
|
|
|
<field name="remaining_hours" />
|
|
|
|
</templates>
|
|
|
|
<div class="oe_kanban_bottom_left" position="inside">
|
|
|
|
<t t-if="record.progress.raw_value > 80 and record.progress.raw_value < 100">
|
|
|
|
<div t-att-class="'oe_kanban_align label label-' + (record.progress.raw_value >= 99 ? 'danger': 'warning')"
|
|
|
|
groups="project.group_time_work_estimation_tasks" title="Remaining hours">
|
|
|
|
<field name="remaining_hours" widget="float_time" />
|
|
|
|
</div>
|
|
|
|
</t>
|
|
|
|
</div>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<act_window id="project_task_action_view_timesheet"
|
|
|
|
name="Timesheet Entries"
|
|
|
|
src_model="project.task"
|
|
|
|
res_model="account.analytic.line"
|
|
|
|
view_mode="tree"
|
|
|
|
view_id="hr_timesheet_line_tree"
|
|
|
|
context="{
|
|
|
|
'search_default_task_id': [active_id],
|
|
|
|
'default_task_id': active_id,
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
|
|
|
|
</data>
|
2018-01-16 11:34:37 +01:00
|
|
|
</flectra>
|