From ebfb3141b65e333464de08859287b9aebe1abee6 Mon Sep 17 00:00:00 2001
From: jordan <jordan@le-filament.com>
Date: Tue, 2 Nov 2021 15:59:20 +0100
Subject: [PATCH] [update] default group by date:day in hr_timesheet for tree
 view

---
 views/hr_timesheet.xml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/views/hr_timesheet.xml b/views/hr_timesheet.xml
index 80e09bf..1cffd34 100644
--- a/views/hr_timesheet.xml
+++ b/views/hr_timesheet.xml
@@ -31,6 +31,9 @@
                     <filter string="Contact" name="groupby_partner" domain="[]" context="{'group_by':'partner_id'}"/>
                     <filter string="Dispositif financier" name="groupby_financial_system" domain="[]" context="{'group_by':'ur_financial_system_id'}"/>
                 </xpath>
+                <xpath expr="//filter[@name='groupby_date']" position="attributes">
+                    <attribute name="context">{'group_by':'date:day'}</attribute>
+                </xpath>
                 <xpath expr="//filter[@name='groupby_project']" position="attributes">
                     <attribute name="string">Code activité UR</attribute>
                 </xpath>
@@ -189,7 +192,7 @@
         <record id="hr_timesheet.act_hr_timesheet_line" model="ir.actions.act_window">
             <field name="name">Mes lignes de temps</field>
             <field name="view_mode">calendar,tree,form,pivot</field>
-            <field name="context">{'search_default_no_report': 1}</field>
+            <field name="context">{'search_default_no_report': 1, 'search_default_groupby_date': 1}</field>
             <field name="view_ids" eval="[(5, 0, 0),
                 (0, 0, {'view_mode': 'tree', 'sequence': 5, 'view_id': ref('cgscop_timesheet.view_cgscop_hr_timesheet_line_tree')}),
                 (0, 0, {'view_mode': 'calendar', 'sequence': 10, 'view_id': ref('cgscop_timesheet.view_cgscop_hr_timesheet_line_calendar')}),
-- 
GitLab