From b5a7fb0ab5bc97c6e7725d88a1d8e618223ab9be Mon Sep 17 00:00:00 2001 From: Juliana <juliana@le-filament.com> Date: Wed, 8 Jan 2020 10:03:57 +0100 Subject: [PATCH] changement widget time pour impression + ajout droit + bug rapport total --- security/ir.model.access.csv | 1 + views/hr_timesheet.xml | 4 +++- wizard/report_hr_timesheet.xml | 14 +++++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv index e34ddb6..d18c7c4 100644 --- a/security/ir.model.access.csv +++ b/security/ir.model.access.csv @@ -1,5 +1,6 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_cgscop_timesheet_code,access_cgscop_timesheet_code,model_cgscop_timesheet_code,base.group_user,1,0,0,0 +access_cgscop_timesheet_code_cg_manager,access_cgscop_timesheet_code_cg,model_cgscop_timesheet_code,cgscop_partner.group_cg_administrator,1,1,1,1 access_ur_financial_system,access_ur_financial_system,model_ur_financial_system,base.group_user,1,0,0,0 access_ur_financial_system_ur_manager,access_ur_financial_system_ur,model_ur_financial_system,cgscop_partner.group_ur_list_modif,1,1,1,1 access_ur_financial_system_cg_manager,access_ur_financial_system_cg,model_ur_financial_system,cgscop_partner.group_cg_administrator,1,1,1,1 diff --git a/views/hr_timesheet.xml b/views/hr_timesheet.xml index 5b1a849..6d08fe0 100644 --- a/views/hr_timesheet.xml +++ b/views/hr_timesheet.xml @@ -59,7 +59,9 @@ <field name="task_id" position="attributes"> <attribute name="invisible">True</attribute> </field> - <field name="unit_amount" widget="timesheet_uom" sum="Total"/> + <field name="unit_amount" position="attributes"> + <attribute name="widget">float_time</attribute> + </field> <field name="unit_amount" position="after"> <field name="ur_financial_system_id" options="{'no_open': True, 'no_create': True}"/> </field> diff --git a/wizard/report_hr_timesheet.xml b/wizard/report_hr_timesheet.xml index 98d8e63..4e90bfc 100644 --- a/wizard/report_hr_timesheet.xml +++ b/wizard/report_hr_timesheet.xml @@ -43,14 +43,14 @@ <td><span t-field="line.ur_financial_system_id"/></td> <td class="text-right"><span t-field="line.unit_amount" t-options="{'widget': 'duration', 'digital': True, 'unit': 'hour', 'round': 'minute'}"/></td> </tr> - <tr> - <td /> - <td /> - <td /> - <td class="text-right"><strong>Total</strong></td> - <td class="text-right"><strong t-esc="sum(o.timesheet_ids.mapped('unit_amount'))" t-options="{'widget': 'duration', 'digital': True, 'unit': 'hour', 'round': 'minute'}"/></td> - </tr> </t> + <tr> + <td /> + <td /> + <td /> + <td class="text-right"><strong>Total</strong></td> + <td class="text-right"><strong t-esc="sum(o.timesheet_ids.mapped('unit_amount'))" t-options="{'widget': 'duration', 'digital': True, 'unit': 'hour', 'round': 'minute'}"/></td> + </tr> </tbody> </table> </div> -- GitLab