diff options
| author | Jorge Pinna Puissant <jpp@odoo.com> | 2019-01-17 11:11:47 +0000 |
|---|---|---|
| committer | Jorge Pinna Puissant <jpp@odoo.com> | 2019-01-17 12:26:20 +0000 |
| commit | 91fb15510ff549e7544f6858f7979b57fae875e7 (patch) | |
| tree | 06daec35429d84052e0fdacb40e56aac6e7f4897 | |
| parent | 586dc9e025b787e18686717c33d4d0ffed7f8d79 (diff) | |
[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
| -rw-r--r-- | addons/hr_timesheet/views/project_views.xml | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/addons/hr_timesheet/views/project_views.xml b/addons/hr_timesheet/views/project_views.xml index 8b6a8dc1386..739431e0a3a 100644 --- a/addons/hr_timesheet/views/project_views.xml +++ b/addons/hr_timesheet/views/project_views.xml @@ -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"> |
