Comment 1 for bug 1153107

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: Wrong calculation of lead times

After further analysis, the main problem that was detected (in case 1.1) is in fact a timezone issue: when converting the "order date" of Sales Orders or Purchase Orders into the "reference date" for scheduling delivery and procurement, the "order date" is taken as if it was in UTC like all datetime values. In reality it is a fields.date and therefore expressed in the user's timezone.

This needs to be fixed by properly converting the "order date" into a UTC timestamp. During the conversion we don't have any time (hour of day) for the "order date", but we can arbitrarily use noon instead, it does not matter much as long as we treat that value in the correct timezone.