← Back to team overview

account-payment-team team mailing list archive

[Merge] lp:~agilebg/account-payment/7.0_bug_1210603_elbati into lp:account-payment/7.0

 

Lorenzo Battistini - Agile BG has proposed merging lp:~agilebg/account-payment/7.0_bug_1210603_elbati into lp:account-payment/7.0.

Requested reviews:
  Account Payment (account-payment-team)
Related bugs:
  Bug #1210603 in Additional payment, bank statement and voucher addons for OpenERP: "[7.0] account_payment_extension - can't pay with 'direct payment'"
  https://bugs.launchpad.net/account-payment/+bug/1210603

For more details, see:
https://code.launchpad.net/~agilebg/account-payment/7.0_bug_1210603_elbati/+merge/179502
-- 
https://code.launchpad.net/~agilebg/account-payment/7.0_bug_1210603_elbati/+merge/179502
Your team Account Payment is requested to review the proposed merge of lp:~agilebg/account-payment/7.0_bug_1210603_elbati into lp:account-payment/7.0.
=== modified file 'account_payment_extension/payment.py'
--- account_payment_extension/payment.py	2012-11-01 21:49:33 +0000
+++ account_payment_extension/payment.py	2013-08-09 17:12:01 +0000
@@ -250,13 +250,13 @@
                     'credit': ((amount<0) and -amount) or 0.0,
                     'journal_id': order.mode.journal.id,
                     'period_id': order.period_id.id,
-                    'currency_id': currency_id,
                 }
                 
                 amount = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency_id, line_amount, context=ctx)
                 if currency_id <> company_currency_id:
                     amount_cur = self.pool.get('res.currency').compute(cr, uid, company_currency_id, currency_id, amount, context=ctx)
                     val['amount_currency'] = -amount_cur
+                    val['currency_id'] = currency_id
 
                 if line.account_id and line.account_id.currency_id and line.account_id.currency_id.id <> company_currency_id:
                     val['currency_id'] = line.account_id.currency_id.id


Follow ups