[FIX-BUG] project_long_term - lp:701070

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

bzr revid: jam@tinyerp.com-20110111052423-ot4hx1b4rj5gtvoy
This commit is contained in:
jam-openerp 2011-01-11 10:54:23 +05:30
parent 740a3169ef
commit 7b40023158
1 changed files with 5 additions and 2 deletions

View File

@ -517,8 +517,11 @@ def Project_%d():
# Allocating Memory for the required Project and Pahses and Resources
exec(func_str)
Project = eval('Project_%d' % project.id)
project = Task.BalancedProject(Project)
project = None
try:
project = Task.BalancedProject(Project)
except :
raise osv.except_osv(_('Error !'),_('Invalid resource allocation, Phase Scheduling is not possible.\nPlease check project member resource.'))
for phase_id in phase_ids:
act_phase = phase_pool.browse(cr, uid, phase_id, context=context)
resources = act_phase.resource_ids