[FIX] project_long_term: Use the isinstance built-in function instead of type

bzr revid: stephane@openerp.com-20100730123521-79aal4640kzetw57
This commit is contained in:
Stephane Wirtel 2010-07-30 14:35:21 +02:00
parent bcc0baba8e
commit ac56c74c8c
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ class project_phase(osv.osv):
return super(project_phase, self).write(cr, uid, ids, vals, context=context)
# Consider calendar and efficiency if the phase is performed by a resource
# otherwise consider the project's working calendar
if type(ids) == int:
if isinstance(ids, (int, long)):
ids = [ids]
phase = self.browse(cr, uid, ids[0], context=context)
calendar_id = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False