Merge lp:~openerp-dev/openobject-addons/6.0-opw-572784-rha into lp:openobject-addons/6.0

Proposed by Rifakat Husen (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 5149
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-572784-rha
Merge into: lp:openobject-addons/6.0
Diff against target: 12 lines (+1/-1)
1 file modified
account_voucher/account_voucher.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-572784-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+98379@code.launchpad.net

Description of the change

Hello,

In customer/supplier refund payment voucher, Write-Off Amount displays wrong value when we provide negative voucher Amount, hence wrong accounting entries are generated. Voucher lines amount should be subtracted from absolute of voucher Amount.

Please review this fix.

Regards,
Rifakat

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

5149. By Rifakat Husen (OpenERP)

[FIX] account_voucher: wrong writeoff amount when doing payment for refund, used absolute of voucher amount because line amount should be subtracted from absolute of voucher amount

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_voucher/account_voucher.py'
2--- account_voucher/account_voucher.py 2012-03-14 12:45:56 +0000
3+++ account_voucher/account_voucher.py 2012-03-20 10:05:59 +0000
4@@ -172,7 +172,7 @@
5 debit += l.amount
6 for l in voucher.line_cr_ids:
7 credit += l.amount
8- res[voucher.id] = abs(voucher.amount - abs(credit - debit))
9+ res[voucher.id] = abs(abs(voucher.amount) - abs(credit - debit))
10 return res
11
12 _name = 'account.voucher'