From 266b553aa85670bf673b49347d076806cd961297 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Tue, 25 Mar 2014 16:10:47 +0100 Subject: [PATCH] [FIX] pass correct magic value for resource [FIX] typo lp bug: https://launchpad.net/bugs/1297352 fixed bzr revid: hbrunn@therp.nl-20140325151047-6sd0irzu4e85i5ru --- addons/mrp_operations/mrp_operations.py | 4 +++- addons/resource/resource.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 52fdda1a7b2..de2b9ef622b 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -279,7 +279,9 @@ class mrp_production(osv.osv): i = self.pool.get('resource.calendar').interval_get( cr, uid, - wc.workcenter_id.calendar_id and wc.workcenter_id.calendar_id.id or False, + #passing False makes resource_resource._schedule_hours + #run 1000 iterations doing nothing + wc.workcenter_id.calendar_id and wc.workcenter_id.calendar_id.id or None, dt, wc.hour or 0.0 ) diff --git a/addons/resource/resource.py b/addons/resource/resource.py index 962cad9eb92..58acc0cd170 100644 --- a/addons/resource/resource.py +++ b/addons/resource/resource.py @@ -436,7 +436,7 @@ class resource_calendar(osv.osv): working_intervals = self.get_working_intervals_of_day(cr, uid, id, **call_args) - if id is None and not working_interval: # no calendar -> consider working 8 hours + if id is None and not working_intervals: # no calendar -> consider working 8 hours remaining_hours -= 8.0 elif working_intervals: if backwards: