[MERGE] _compute_planned_workcenter passes wrong magic value for absent calendar_id. Courtesy of Holger Brunn (Therp)

lp bug: https://launchpad.net/bugs/1297352 fixed

bzr revid: qdp-launchpad@openerp.com-20140403093833-923ly0uz860gd3i2
This commit is contained in:
Quentin (OpenERP) 2014-04-03 11:38:33 +02:00
commit 2006e8d6be
2 changed files with 3 additions and 2 deletions

View File

@ -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
)

View File

@ -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: