banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #01635
[Bug 1287708] [NEW] account_statement_base_completion: useless query
Public bug reported:
See:
http://bazaar.launchpad.net/~banking-addons-team/banking-addons/bank-statement-reconcile-70/view/head:/account_statement_base_completion/statement.py#L317
The key 'partner_memoizer' is never set in the context, so a search on all the partners is always executed.
Then, the full list of IDs is used in the next query in "WHERE id IN %s" which is really inefficient.
I guess this is dead code and propose to remove it completely.
If someone claims that there is a reason to have this key in the context
(used by another module I may be unaware of), then the former search is
still useless as we already know the IDs.
In all cases, a search should be done to apply the record rules, but
*after* the big query so it will be done only on a subset of a few IDs.
** Affects: banking-addons
Importance: Undecided
Assignee: Guewen Baconnier @ Camptocamp (gbaconnier-c2c)
Status: New
** Changed in: banking-addons
Assignee: (unassigned) => Guewen Baconnier @ Camptocamp (gbaconnier-c2c)
** Description changed:
- See:
+ See:
http://bazaar.launchpad.net/~banking-addons-team/banking-addons/bank-statement-reconcile-70/view/head:/account_statement_base_completion/statement.py#L317
The key 'partner_memoizer' is never set in the context, so a search on all the partners is always executed.
Then, the full list of IDs is used in the next query in "WHERE id IN %s" which is really inefficient.
I guess this is dead code and propose to remove it completely.
If someone claims that there is a reason to have this key in the context
(used by another module I may be unaware of), then the former search is
still useless as we already know the IDs.
In all cases, a search should be done to apply the record rules, but
*after* the big query so it will be done only on a subset of a few IDs.
--
You received this bug notification because you are a member of Banking
Addons Core Editors, which is subscribed to Banking Addons.
https://bugs.launchpad.net/bugs/1287708
Title:
account_statement_base_completion: useless query
Status in OpenERP Banking Addons:
New
Bug description:
See:
http://bazaar.launchpad.net/~banking-addons-team/banking-addons/bank-statement-reconcile-70/view/head:/account_statement_base_completion/statement.py#L317
The key 'partner_memoizer' is never set in the context, so a search on all the partners is always executed.
Then, the full list of IDs is used in the next query in "WHERE id IN %s" which is really inefficient.
I guess this is dead code and propose to remove it completely.
If someone claims that there is a reason to have this key in the
context (used by another module I may be unaware of), then the former
search is still useless as we already know the IDs.
In all cases, a search should be done to apply the record rules, but
*after* the big query so it will be done only on a subset of a few
IDs.
To manage notifications about this bug go to:
https://bugs.launchpad.net/banking-addons/+bug/1287708/+subscriptions
Follow ups
References