Merge lp:~therp-nl/banking-addons/6.1_fix__get_move_info_semantics into lp:banking-addons/6.1
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 168 | ||||
Proposed branch: | lp:~therp-nl/banking-addons/6.1_fix__get_move_info_semantics | ||||
Merge into: | lp:banking-addons/6.1 | ||||
Diff against target: |
79 lines (+26/-41) 1 file modified
account_banking/banking_import_transaction.py (+26/-41) |
||||
To merge this branch: | bzr merge lp:~therp-nl/banking-addons/6.1_fix__get_move_info_semantics | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stefan Rijnhart (Opener) | Approve | ||
Holger Brunn (Therp) | Needs Resubmitting | ||
Review via email:
|
Description of the change
Quote from the discussion on https:/
The method should assign:
- match_type = 'invoice' if there are move lines and all have an invoice, or
- match_type = 'move_lines' if there are move lines,
- match_type = False otherwise
However, the code in your alternative branch does the same for partner and account. I do not think that that should be the case. The reason for this is that the code considers invoices a special case of move lines. If all move lines have invoices we prefer to ask the user to select the correct invoice instead of move lines.
There is no such specialization of partners and accounts. Whether the code should suggest the partner and account of the first match of multiple matches is just an interface issue. These are overwritten anyway when the user disambiguates the match.
Now I ask myself: Why do we loop through all move lines, setting partner_id and account_id, but resetting it if they differ? If we don't care, we can take the first *_id found and then break. If we do care, we should do something in the lines of this MP