Merge lp:~pedro.baeza/account-payment/6.1-account_payment_extension-fix-amount-sign into lp:~account-payment-team/account-payment/6.1

Proposed by Pedro Manuel Baeza on 2013-10-23
Status: Merged
Merged at revision: 113
Proposed branch: lp:~pedro.baeza/account-payment/6.1-account_payment_extension-fix-amount-sign
Merge into: lp:~account-payment-team/account-payment/6.1
Diff against target: 16 lines (+6/-0)
1 file modified
account_payment_extension/payment.py (+6/-0)
To merge this branch: bzr merge lp:~pedro.baeza/account-payment/6.1-account_payment_extension-fix-amount-sign
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) code review Approve on 2013-12-27
mikel 2013-10-23 Approve on 2013-12-04
Review via email: mp+192377@code.launchpad.net

Description of the change

[FIX] account_payment_extension: Correct sign for amount and amount_currency when adding lines manually in a receivable payment order.

This is the same change as for 7.0:

https://code.launchpad.net/~pedro.baeza/account-payment/7.0-account_payment_extension-fix-amount-sign/+merge/192373

To post a comment you must log in.
mikel (mikel-martin) wrote :

I see it ok.

review: Approve
review: Approve (code review)
Pedro Manuel Baeza (pedro.baeza) wrote :

Please proceed with the merge, due to the age of the MP and having 2 approvals.

Regards.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_payment_extension/payment.py'
2--- account_payment_extension/payment.py 2013-06-25 20:17:09 +0000
3+++ account_payment_extension/payment.py 2013-10-23 17:46:24 +0000
4@@ -380,6 +380,12 @@
5 if line.name != '/':
6 res['value']['communication'] = res['value']['communication'] + '. ' + line.name
7 res['value']['account_id'] = line.account_id.id
8+ if context.get('order_id'):
9+ payment_order = self.pool.get('payment.order').browse(
10+ cr, uid, context['order_id'], context=context)
11+ if payment_order.type == 'receivable':
12+ res['value']['amount'] *= -1
13+ res['value']['amount_currency'] *= -1
14 return res
15
16 payment_line()

Subscribers

People subscribed via source and target branches