Merge lp:~camptocamp/c2c-financial-addons/6.1-fix-counterpart-1016390 into lp:c2c-financial-addons/6.1

Proposed by Guewen Baconnier @ Camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/c2c-financial-addons/6.1-fix-counterpart-1016390
Merge into: lp:c2c-financial-addons/6.1
Diff against target: 24 lines (+5/-8)
1 file modified
account_financial_report_webkit/report/common_reports.py (+5/-8)
To merge this branch: bzr merge lp:~camptocamp/c2c-financial-addons/6.1-fix-counterpart-1016390
Reviewer Review Type Date Requested Status
Joël Grand-Guillaume @ camptocamp code review, no tests Approve
Review via email: mp+131135@code.launchpad.net

Description of the change

related to lp:1016390

I'm not sure that is a correction for the bug, but this query needed to be simplified anyway.

To post a comment you must log in.
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

LGTM

review: Approve (code review, no tests)

Unmerged revisions

92. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] account_financial_report_webkit: fix the query which build a list of accounts counterparts

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_financial_report_webkit/report/common_reports.py'
--- account_financial_report_webkit/report/common_reports.py 2012-02-23 14:14:02 +0000
+++ account_financial_report_webkit/report/common_reports.py 2012-10-24 08:01:19 +0000
@@ -481,15 +481,12 @@
481SELECT account_move.id,481SELECT account_move.id,
482 array_to_string(482 array_to_string(
483 ARRAY(SELECT DISTINCT a.code483 ARRAY(SELECT DISTINCT a.code
484 FROM account_move_line m2484 FROM account_move_line ml
485 LEFT JOIN account_account a ON (m2.account_id=a.id)485 JOIN account_account a ON (ml.account_id = a.id)
486 WHERE m2.move_id =account_move_line.move_id486 WHERE ml.move_id = account_move.id
487 AND m2.account_id<>%s limit %s) , ', ')487 AND ml.account_id != %s limit %s), ', ')
488
489FROM account_move488FROM account_move
490 JOIN account_move_line on (account_move_line.move_id = account_move.id)489WHERE id in %s"""
491 JOIN account_account on (account_move_line.account_id = account_account.id)
492WHERE move_id in %s"""
493490
494 try:491 try:
495 self.cursor.execute(sql, (account_id, limit, tuple(move_ids)))492 self.cursor.execute(sql, (account_id, limit, tuple(move_ids)))

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: