[FIX]project: fix domain in order not to see all stages in task views

bzr revid: csn@openerp.com-20130430143529-3dk22kinb2vo2rvy
This commit is contained in:
Cedric Snauwaert 2013-04-30 16:35:29 +02:00
parent ba5710962e
commit 8f96d0d177
1 changed files with 2 additions and 1 deletions

View File

@ -622,7 +622,8 @@ class task(base_stage, osv.osv):
search_domain = []
project_id = self._resolve_project_id_from_context(cr, uid, context=context)
if project_id:
search_domain += [('project_ids', '=', project_id)]
search_domain += ['|', ('project_ids', '=', project_id)]
search_domain += [('id', 'in', ids)]
stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search