Skip to content
Snippets Groups Projects
Commit 91fb1551 authored by Jorge Pinna Puissant's avatar Jorge Pinna Puissant
Browse files

[FIX] hr_timesheet: task view in mobile

Before this commit, there were not specific view for the mobile devices.
The analytic account views were used.

Now, there are specifics views for the timesheet in the tasks.

opw-1913371

closes odoo/odoo#30309
parent 586dc9e0
Branches
Tags
No related merge requests found
......@@ -67,7 +67,7 @@
<field name="progress" widget="progressbar"/>
</group>
</group>
<field name="timesheet_ids" context="{'default_project_id': project_id}">
<field name="timesheet_ids" mode="tree,kanban" context="{'default_project_id': project_id}">
<tree editable="bottom" string="Timesheet Activities" default_order="date">
<field name="date"/>
<field name="user_id" invisible="1"/>
......@@ -76,6 +76,50 @@
<field name="unit_amount" string="Duration" widget="float_time"/>
<field name="project_id" invisible="1"/>
</tree>
<kanban class="o_kanban_mobile">
<field name="date"/>
<field name="user_id"/>
<field name="employee_id"/>
<field name="name"/>
<field name="unit_amount"/>
<field name="project_id"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div class="row">
<div class="col-xs-6">
<strong><span><t t-esc="record.employee_id.value"/></span></strong>
</div>
<div class="col-xs-6 pull-right text-right">
<strong><t t-esc="record.date.value"/></strong>
</div>
</div>
<div class="row">
<div class="col-xs-6 text-muted">
<span><t t-esc="record.name.value"/></span>
</div>
<div class="col-xs-6">
<span class="pull-right text-right">
<field name="unit_amount" widget="float_time"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
<form string="Timesheet Activities">
<sheet>
<group>
<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"/>
</group>
</sheet>
</form>
</field>
<group>
<group class="oe_subtotal_footer oe_right" name="project_hours">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment