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
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py 2012-02-17 23:36:43 +0000
+++ account_banking/banking_import_transaction.py 2012-02-18 13:31:18 +0000
@@ -486,11 +486,11 @@
486 line_partial_ids = line_ids[:]486 line_partial_ids = line_ids[:]
487 line_ids = []487 line_ids = []
488 reconcile_obj.write(488 reconcile_obj.write(
489 cr, uid, reconcile_id, 489 cr, uid, reconcile.id,
490 { 'line_id': [(6, 0, line_ids)],490 { 'line_id': [(6, 0, line_ids)],
491 'line_partial_ids': [(6, 0, line_partial_ids)],491 'line_partial_ids': [(6, 0, line_partial_ids)],
492 }, context=context)492 }, context=context)
493 return reconcile_id493 return reconcile.id
494494
495 def _do_move_unreconcile(self, cr, uid, move_line_ids, currency, context=None):495 def _do_move_unreconcile(self, cr, uid, move_line_ids, currency, context=None):
496 """496 """
@@ -820,18 +820,12 @@
820 'name': '(write-off) %s' % (820 'name': '(write-off) %s' % (
821 trans.move_line_id.move_id.name or '')821 trans.move_line_id.move_id.name or '')
822 }, context=context)822 }, context=context)
823 writeoff_debit = False823 if trans.residual > 0:
824 writeoff_credit = False824 writeoff_debit = trans.residual
825 if trans.statement_line_id.amount > 0:825 writeoff_credit = False
826 if trans.residual > 0:
827 writeoff_debit = trans.residual
828 else:
829 writeoff_credit = - trans.residual
830 else:826 else:
831 if trans.residual > 0:827 writeoff_debit = False
832 writeoff_credit = trans.residual828 writeoff_credit = - trans.residual
833 else:
834 writeoff_debit = - trans.residual
835 vals = {829 vals = {
836 'name': trans.statement_line_id.name,830 'name': trans.statement_line_id.name,
837 'date': trans.statement_line_id.date,831 'date': trans.statement_line_id.date,

Subscribers

People subscribed via source and target branches