Merge lp:~therp-nl/banking-addons/6.1_lp1176783 into lp:banking-addons/6.1
Proposed by
Holger Brunn (Therp)
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Holger Brunn (Therp) | ||||
Proposed branch: | lp:~therp-nl/banking-addons/6.1_lp1176783 | ||||
Merge into: | lp:banking-addons/6.1 | ||||
Diff against target: |
22 lines (+3/-2) 1 file modified
account_banking/banking_import_transaction.py (+3/-2) |
||||
To merge this branch: | bzr merge lp:~therp-nl/banking-addons/6.1_lp1176783 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stefan Rijnhart (Opener) | Needs Fixing | ||
Review via email:
|
To post a comment you must log in.
I must apologize for the elaborate 'type' discovery in _get_move_info() but what it attempts is to set match type to 'invoice' only if all candidate move lines are linked to an invoice. Your fix does not honour this admittedly implicit logic.
Of course, if match_type comes out as 'invoice' while not all move lines actually have an invoice then the code is broken and should be fixed. The loop where it checks for invoice on the move lines and a couple of other lines after it can probably be replaced by something like
if move_lines:
retval[ 'match_ type'] = 'invoice'
retval[ 'type'] = type_map[ move_lines[ 0].invoice. type]
retval[ 'match_ type'] = 'move'
if all(line.invoice for line in move_lines):
else:
The method's signature allows for an apriori match_type argument but it does not seem to be used anywhere and could probably be refactored out.
Does this in fact fix your case or am I missing something?