Merge lp:~camptocamp/account-consolidation/fix-domain-nbi into lp:~account-core-editors/account-consolidation/7.0

Proposed by Nicolas Bessi - Camptocamp
Status: Merged
Merged at revision: 21
Proposed branch: lp:~camptocamp/account-consolidation/fix-domain-nbi
Merge into: lp:~account-core-editors/account-consolidation/7.0
Diff against target: 12 lines (+2/-1)
1 file modified
account_consolidation/ (+2/-1)
To merge this branch: bzr merge lp:~camptocamp/account-consolidation/fix-domain-nbi
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp Approve
Leonardo Pistone Approve
Review via email:

Description of the change

[FIX] doamin on function fields that can badly impact performance

To post a comment you must log in.
Revision history for this message
Leonardo Pistone (lepistone) wrote :

On a low-level, I see that elements of curr_ids that are not in ids should not change the result. So I approve the fix.

On the other hand, I don't get what the method does. Could you take the occasion to add a docstring or comment, and maybe rename tid, ids, curr_ids ...


review: Approve
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Good catch

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_consolidation/'
2--- account_consolidation/ 2013-03-12 10:21:10 +0000
3+++ account_consolidation/ 2014-04-17 13:59:33 +0000
4@@ -27,7 +27,8 @@
6 def _current_company(self, cursor, uid, ids, name, args, context=None):
7 company_id = self.pool['']._company_default_get(cursor, uid)
8- curr_ids =, uid, [('company_id', '=', company_id)])
9+ curr_ids =, uid, [('company_id', '=', company_id),
10+ ('id', 'in', ids)])
11 res = dict([(tid, tid in curr_ids) for tid in ids])
12 return res


People subscribed via source and target branches