Merge lp:~therp-nl/banking-addons/fixes-interactive-branch into lp:~banking-addons-team/banking-addons/6.1-dev

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Approved by: James Jesudason
Approved revision: 108
Merged at revision: 111
Proposed branch: lp:~therp-nl/banking-addons/fixes-interactive-branch
Merge into: lp:~banking-addons-team/banking-addons/6.1-dev
Diff against target: 41 lines (+7/-13)
1 file modified
account_banking/banking_import_transaction.py (+7/-13)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/fixes-interactive-branch
Reviewer Review Type Date Requested Status
James Jesudason (community) Approve
Review via email: mp+93688@code.launchpad.net

Commit message

[FIX] Reconciling raises error when partial reconciliation is present
[FIX] Wrong sign in residual write-off in some cases

To post a comment you must log in.
Revision history for this message
James Jesudason (jamesj) wrote :

Looks fine. I'll do more detailed testing once these changes are merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking/banking_import_transaction.py'
2--- account_banking/banking_import_transaction.py 2012-02-17 23:36:43 +0000
3+++ account_banking/banking_import_transaction.py 2012-02-18 13:31:18 +0000
4@@ -486,11 +486,11 @@
5 line_partial_ids = line_ids[:]
6 line_ids = []
7 reconcile_obj.write(
8- cr, uid, reconcile_id,
9+ cr, uid, reconcile.id,
10 { 'line_id': [(6, 0, line_ids)],
11 'line_partial_ids': [(6, 0, line_partial_ids)],
12 }, context=context)
13- return reconcile_id
14+ return reconcile.id
15
16 def _do_move_unreconcile(self, cr, uid, move_line_ids, currency, context=None):
17 """
18@@ -820,18 +820,12 @@
19 'name': '(write-off) %s' % (
20 trans.move_line_id.move_id.name or '')
21 }, context=context)
22- writeoff_debit = False
23- writeoff_credit = False
24- if trans.statement_line_id.amount > 0:
25- if trans.residual > 0:
26- writeoff_debit = trans.residual
27- else:
28- writeoff_credit = - trans.residual
29+ if trans.residual > 0:
30+ writeoff_debit = trans.residual
31+ writeoff_credit = False
32 else:
33- if trans.residual > 0:
34- writeoff_credit = trans.residual
35- else:
36- writeoff_debit = - trans.residual
37+ writeoff_debit = False
38+ writeoff_credit = - trans.residual
39 vals = {
40 'name': trans.statement_line_id.name,
41 'date': trans.statement_line_id.date,

Subscribers

People subscribed via source and target branches