Merge lp:~camptocamp/ocb-addons/7.0-fix-project-search into lp:ocb-addons

Proposed by Nicolas Bessi - Camptocamp
Status: Merged
Merged at revision: 9217
Proposed branch: lp:~camptocamp/ocb-addons/7.0-fix-project-search
Merge into: lp:ocb-addons
Diff against target: 12 lines (+1/-1)
1 file modified
project/project.py (+1/-1)
To merge this branch: bzr merge lp:~camptocamp/ocb-addons/7.0-fix-project-search
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Stefan Rijnhart (Opener) Approve
Review via email: mp+166667@code.launchpad.net

Description of the change

Fix 1186146

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Verified that project_user_rel.project_id refers to table project_project. Thanks!

review: Approve
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project/project.py'
2--- project/project.py 2013-05-29 14:30:22 +0000
3+++ project/project.py 2013-05-31 07:42:27 +0000
4@@ -85,7 +85,7 @@
5 if context and context.get('user_preference'):
6 cr.execute("""SELECT project.id FROM project_project project
7 LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id
8- LEFT JOIN project_user_rel rel ON rel.project_id = project.analytic_account_id
9+ LEFT JOIN project_user_rel rel ON rel.project_id = project.id
10 WHERE (account.user_id = %s or rel.uid = %s)"""%(user, user))
11 return [(r[0]) for r in cr.fetchall()]
12 return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order,