[6.1]Calculating datetime from date cause timezone issues in sales order

Bug #992259 reported by Don Kirkby
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP Publisher's Warranty Team

Bug Description

This may be similar to the hr_timesheet_sheet bug 943091, and is certainly related to the change in 6.1 to use UTC on all datetime fields in the server, as described in bug 925361. It sounds like the context_today() method helps when calculating date fields based on the current date, but how can we calculate a datetime based on a pure date?

The example scenario I have run into is confirming a sales order.

1. My OpenERP user timezone is -7:00 PDT. (Set in the OpenERP user preferences.)
2. I create a sales order with date 2012-05-01.
3. I confirm the sales order, and look at the picking list.

Expected behaviour: the picking list should have order date 2012-05-01 00:00:00. Also acceptable would be to ignore the sales order's order date, and use the current datetime for the picking list's order date as it did in version 5.0.
Actual behaviour: the picking list has order date 2012-04-30 17:00:00. This is 2012-05-01 midnight UTC adjusted for the user's time zone.

A similar problem exists on the procurement table when moving from the wizard's date field to the table's datetime field.

I am running 6.1.1 on Ubuntu 10.04.

Tags: hr
Don Kirkby (donkirkby)
description: updated
Don Kirkby (donkirkby)
description: updated
Don Kirkby (donkirkby)
description: updated
Don Kirkby (donkirkby)
description: updated
Revision history for this message
Ravish(OpenERP) (rmu-openerp) wrote :

Hello Don,

I have checked your issue .But, for me ,it's working fine.
For your more reference , I have attached video .Please take a look.

Waiting for your feedback..!!

Thanks!!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Don Kirkby (donkirkby) wrote :

Thanks for trying to reproduce it, Ravish.

Please check that your OpenERP user time zone is set to PDT. In the video, it looked like you were checking your operating system's time zone setting. In the OpenERP menu, choose User: Preferences, and set the Timezone field to America/Vancouver.

What version of OpenERP are you testing? I just tested it at the 6.1.1 tag in the 6.1 branch, and it still has the problem for me.

description: updated
Changed in openobject-addons:
status: Incomplete → New
summary: - Calculating datetime from date cause timezone issues in sales order
+ [6.1]Calculating datetime from date cause timezone issues in sales order
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
Don Kirkby (donkirkby) wrote :

I just came across another scenario of the same problem in the procurement screen. If I make a procurement for a product, and set the date in the wizard to 2012-11-01, then the scheduled date on the procurement will be 2012-10-31 17:00:00.

description: updated
Revision history for this message
Yann Papouin (yann-papouin) wrote :
tags: added: hr
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.