diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 52fdda1a7b2..b464f7045e6 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -279,7 +279,8 @@ 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: