diff options
| author | Martin Trigaux <mat@openerp.com> | 2014-01-22 11:00:05 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2014-01-22 11:00:05 +0100 |
| commit | 8e501b9c3bfefc7dbbff072cd1a56ed70708b991 (patch) | |
| tree | cc37e307b0c00a1b8ba3c9a6308bd77b8701bd16 /addons/project_long_term | |
| parent | b25d08f9176b6cfefe2d2a1163b7d064b40fd19f (diff) | |
| parent | c642f391f3873816507c497a64312495f7e779da (diff) | |
[MERGE] [FIX] project_long_term: do not schedule_phases if no project is found (avoid traceback)
bzr revid: mat@openerp.com-20140122100005-z99i013chg18ywqa
Diffstat (limited to 'addons/project_long_term')
| -rw-r--r-- | addons/project_long_term/wizard/project_compute_phases.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/project_long_term/wizard/project_compute_phases.py b/addons/project_long_term/wizard/project_compute_phases.py index c9aa7eb3573..7e7c83a603e 100644 --- a/addons/project_long_term/wizard/project_compute_phases.py +++ b/addons/project_long_term/wizard/project_compute_phases.py @@ -52,7 +52,8 @@ class project_compute_phases(osv.osv_memory): else: project_ids = project_pool.search(cr, uid, [('user_id','=',uid)], context=context) - project_pool.schedule_phases(cr, uid, project_ids, context=context) + if project_ids: + project_pool.schedule_phases(cr, uid, project_ids, context=context) return self._open_phases_list(cr, uid, data, context=context) def _open_phases_list(self, cr, uid, data, context=None): |
