Merge lp:~acsone-openerp/banking-addons/bank-statement-reconcile-70-improve-acc-number-completion into lp:banking-addons/bank-statement-reconcile-70
Proposed by
Laurent Mignon (Acsone)
Status: | Needs review |
---|---|
Proposed branch: | lp:~acsone-openerp/banking-addons/bank-statement-reconcile-70-improve-acc-number-completion |
Merge into: | lp:banking-addons/bank-statement-reconcile-70 |
Diff against target: |
190 lines (+94/-30) 4 files modified
account_statement_bankaccount_completion/__init__.py (+2/-1) account_statement_bankaccount_completion/res_partner_bank.py (+49/-0) account_statement_bankaccount_completion/statement.py (+2/-2) account_statement_bankaccount_completion/tests/test_bankaccount_completion.py (+41/-27) |
To merge this branch: | bzr merge lp:~acsone-openerp/banking-addons/bank-statement-reconcile-70-improve-acc-number-completion |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurent Mignon (Acsone) (community) | Disapprove | ||
Yannick Vaucher @ Camptocamp | code review, no test | Needs Fixing | |
Pedro Manuel Baeza | code review | Needs Fixing | |
Review via email: mp+202861@code.launchpad.net |
Description of the change
Improve the matching on acc_number by removing the formatting characters when querying the res_partner_bank table
To post a comment you must log in.
Unmerged revisions
- 113. By Laurent Mignon (Acsone)
-
Use from . import xxx on __init__.py
Improve the SQL used to match account number
Filter results from the plain SQL query by using the method search from the ORM - 112. By Laurent Mignon (Acsone)
- 111. By Laurent Mignon (Acsone)
-
remove obsolete comment
- 110. By Laurent Mignon (Acsone)
-
Improve the matching on acc_number by removing the formatting characters when querying the res_partner_bank table
- 109. By Laurent Mignon (Acsone)
-
clean up tests before modifcations
Some things catched on a first sight:
- Use from . import xxx on __init__.py
- 'if len(ids):' could be 'if ids', or better, put 'if not ids:' and put the rest of the code inside, returning only the value at the end, because it makes it more readable.
- Don't use SQL query. You can use also ORM search with like operator.
- Complete tests with calls to this method with more cases: account number without spaces that must be right, account number that must be wrong, so that we can test false positives.
Regards.