[FIX] project_long_term: fix if not resource allocation or project member

bzr revid: hmo@tinyerp.com-20100924094712-f7cl79s1zaw3vtuq
This commit is contained in:
Harry (OpenERP)
2010-09-24 15:17:12 +05:30
parent 7a027ed7f2
commit 621f24aee4
@@ -513,7 +513,10 @@ class project_task(osv.osv):
def Project():
title = "Project"
start = datetime.strftime(datetime.strptime(start_date, "%Y-%m-%d"), "%Y-%m-%d %H:%M")
resource = reduce(operator.or_, resources)
try:
resource = reduce(operator.or_, resources)
except:
raise osv.except_osv(_('Error'), _('Should have Resources Allocation or Project Members!'))
minimum_time_unit = 1
if calendar_id: # If project has working calendar
working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context)