Help

3

User timezone not applied to report filters?

Avatar
Kevin Shenk

I've been having a strange problem when trying to pull POS sales summary daily reports. It seems that because our timezone is EST (UTC-4), all sales that are processed after 20:00 EST appear on the next day's sales report.

Let me explain. If we go to 'Reporting' -> 'Point of Sale' -> 'Sale Details' and choose the same start and end date (our accountant likes to pull daily reports), the generated report includes sales from the day selected, as well as all orders from the previous day that were placed after 20:00 EST. The actual date and time in the report is correct for our time zone, but the filter isn't correctly including all and only sales from the selected day. I believe that since all time is converted to UTC by OpenERP, the orders after 20:00 EST are recorded as in the next day's sales.

Is this a bug, is there a workaround?

1 Comment
Avatar
Discard
Avatar
Martin Auger
-

Do we have any fix for this? This is an important problem... Any one find a solution?

6 Answers
1
Avatar
Vince Vinet
Best Answer

Correct handling of timezones in Odoo depends on a few different things. Internal handling is done in UTC. Unless your server's time is bad, times will be good in most scenarios. That is, times will be accurately set as the current UTC time.Display in the web interface is done in local time, according to the user timezones. This is also done correctly in most cases. Note that this is the right way to handle timezones.

Where things usually goes bad is in addons. Some addons are not up to date with the standard with regards to timezone handling, especially when it comes to dates (not datetimes). The problem can be a default date being set with time.strftime, which will use the UTC date, causing problems near day breaks and time offsets. In this case the addon should use fields.date.context_today. Another problem is reports. Some reports filter datetimes according to a naive date boundary instead of local day boundary.

There is no good workaround that will work on multiple time zones. Faulty reports and modules need to be reported, inspected and fixed.

Avatar
Discard
0
Best Answer

Hi,

There is a FLAW in OpenERP / Odoo that S.A. neglects, so they will NOT fix it...

I solved it for my customers using the proposed fixes on this thread on github...

https://github.com/odoo/odoo/issues/2115 

Hope this helps

There is also an OCA module made by Holger Brunn, that allows you to create filters correctly, but I can't remember its name...

Regards

Avatar
Discard
0
Avatar
Bjarne Soegaard
Best Answer

I have a similar problem around POS orders.  Having the POS registration happen in one time zone and validate and register the order on the server residing in another time zone - the orders seem to get the time zone of the server- possibly. It is a cloud environment and even though the server is supposed to be in NY it could really be anywhere.  I am thinking if our problem is solved by setting the time on the server to the time of the POS registration place. Then of course we cannot use this in a third time zone. 

I think there is a fundamental flaw in OpenERP when it comes to global business.  

Does anyone have a good explanation of this?

Avatar
Discard
0
Avatar
Jay Cooper
Best Answer

I have just encountered the same problem except that I am in UTC+10 (actually +11 now with daylight saving). Today's report is actually only from 11:00am onwards, with sales prior to 11:00am appearing on yesterday's report. Are there no workarounds to this so far?

Avatar
Discard
0
Avatar
Sean Samborski
Best Answer

So far everything I've been seeing points to OpenERP being hardcoded to UTC. It seems thee is no need for accurate time reporting for a business.

Avatar
Discard