Skip to Content
Menu
This question has been flagged
2 Replies
3688 Views

I tried to group the calendar events by the start field grouped by day, week and month.

Here is the code I tried


<record id="meeting_group" model="ir.ui.view">
           <field name="name">meeting.group</field>
           <field name="model">calendar.event</field>
           <field name="inherit_id" ref="calendar.view_calendar_event_search"/>
           <field name="arch" type="xml">
               <xpath expr="//search" position="inside">
                   <filter string="day" domain="[]" context="{'group_by':'start:day'}"/>
                   <filter string="Week" domain="[]" context="{'group_by':'start:week'}"/>
                   <filter string="Month" domain="[]" context="{'group_by':'start:month'}"/>
               </xpath>
           </field>
       </record>

This is expected to work fine but but the grouping is not done properly. I get incorrect dates in the group. For example in the group 26/9/2018 there are other date records like 27/9/2018. how to correct?


Avatar
Discard
Best Answer

Check that your USER and BROWSER timezone match.

BROWSER TIMEZONE:

https://whatismytimezone.com/

USER TIMEZONE:



Click your USERNAME, the select PREFERENCES.

Avatar
Discard
Best Answer

Hello,

try with adding your timezone into the filter and check.

<filter string="day" domain="[]" context="{'group_by':'start:day',  'tz': '<your timezone>'}"/>
Avatar
Discard
Related Posts Replies Views Activity
9
Jun 23
11129
2
Jan 22
2732
2
Dec 21
6267
0
Jun 21
1007
0
Feb 21
1540