[FIX] project name search if aa id != project id

lp bug: https://launchpad.net/bugs/1186146 fixed

bzr revid: nicolas.bessi@camptocamp.com-20130531073631-dthwxiyp8mnmtkfr
This commit is contained in:
nicolas.bessi@camptocamp.com 2013-05-31 09:36:31 +02:00
parent ddc7e6c994
commit c3f7fbbf1f
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class project(osv.osv):
if context and context.get('user_preference'):
cr.execute("""SELECT project.id FROM project_project project
LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id
LEFT JOIN project_user_rel rel ON rel.project_id = project.analytic_account_id
LEFT JOIN project_user_rel rel ON rel.project_id = project.id
WHERE (account.user_id = %s or rel.uid = %s)"""%(user, user))
return [(r[0]) for r in cr.fetchall()]
return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order,