[FIX] mrp_operations: convert date_finished into datetime object

Closes #7408
This commit is contained in:
Jeffery Chen Fan 2015-07-02 10:29:07 +02:00 committed by Nicolas Martinelli
parent b02afebd1e
commit 50d714959e
1 changed files with 2 additions and 1 deletions

View File

@ -295,7 +295,8 @@ class mrp_production(osv.osv):
if l.state in ('done','cancel','draft'):
continue
todo += l.move_dest_id_lines
if l.production_id and (l.production_id.date_finished > dt):
date_end = l.production_id.date_finished
if date_end and datetime.strptime(date_end, '%Y-%m-%d %H:%M:%S') > dt:
if l.production_id.state not in ('done','cancel'):
for wc in l.production_id.workcenter_lines:
i = self.pool.get('resource.calendar').interval_min_get(