[FIX]project: if there is no any project manager and try to schedule task its give traceback

bzr revid: pna@tinyerp.com-20130429060231-epygcrs2073f23ny
This commit is contained in:
Pinakin Nayi (OpenERP)
2013-04-29 11:32:31 +05:30
parent 3536f65967
commit 56afde0c84
+7 -4
View File
@@ -477,12 +477,15 @@ def Project():
def Project_%d():
start = \'%s\'
working_days = %s
resource = %s
""" % (
project.id,
project.date_start or time.strftime('%Y-%m-%d'), working_days,
'|'.join(['User_'+str(x) for x in puids])
)
project.date_start or time.strftime('%Y-%m-%d'), working_days
)
resource = '|'.join(['User_'+str(x) for x in puids])
if resource :
result+= """
resource = %s
""" % ( resource, )
vacation = calendar_id and tuple(resource_pool.compute_vacation(cr, uid, calendar_id, context=context)) or False
if vacation:
result+= """