From 56afde0c844890936caaa3dc17db87b5f360779d Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Mon, 29 Apr 2013 11:32:31 +0530 Subject: [FIX]project: if there is no any project manager and try to schedule task its give traceback bzr revid: pna@tinyerp.com-20130429060231-epygcrs2073f23ny --- addons/project/project.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'addons/project/project.py') diff --git a/addons/project/project.py b/addons/project/project.py index a5e540c8be7..5b8ae2c2044 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -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+= """ -- cgit v1.2.3 From 73dfa69e34feef8629ece89ea74ad82eb42b3c5d Mon Sep 17 00:00:00 2001 From: Xavier ALT Date: Fri, 20 Dec 2013 10:18:23 +0100 Subject: [FIX] project: fix task progress not correctly updated when reopening a task bzr revid: xal@openerp.com-20131220091823-o9uvvlo6hdh4xukw --- addons/project/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/project/project.py') diff --git a/addons/project/project.py b/addons/project/project.py index 7f56b573ebb..8487006f8b6 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -808,7 +808,7 @@ class task(base_stage, osv.osv): }), 'progress': fields.function(_hours_get, string='Progress (%)', multi='hours', group_operator="avg", help="If the task has a progress of 99.99% you should close the task if it's finished or reevaluate the time", store = { - 'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours','state'], 10), + 'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours', 'state', 'stage_id'], 10), 'project.task.work': (_get_task, ['hours'], 10), }), 'delay_hours': fields.function(_hours_get, string='Delay Hours', multi='hours', help="Computed as difference between planned hours by the project manager and the total hours of the task.", -- cgit v1.2.3