Module: mrp_operations Fixed date format problem

bzr revid: hda@tinyerp.com-20091111123741-1pagu1r98e8rll0y
This commit is contained in:
NCH(OpenERP) 2009-11-11 18:07:41 +05:30 committed by HDA (OpenERP)
parent 2af45b4557
commit a520687819
1 changed files with 2 additions and 2 deletions

View File

@ -330,8 +330,8 @@ class mrp_operations_operation(osv.osv):
if not i: continue
if code_lst[i-1] not in ('resume','start'):
continue
a = datetime.datetime.strptime(time_lst[i-1],'%Y:%m:%d %H:%M:%S')
b = datetime.datetime.strptime(time_lst[i],'%Y:%m:%d %H:%M:%S')
a = datetime.datetime.strptime(time_lst[i-1],'%Y-%m-%d %H:%M:%S')
b = datetime.datetime.strptime(time_lst[i],'%Y-%m-%d %H:%M:%S')
diff += (b-a).days * 24
diff += (b-a).seconds / (60*60)
return diff