Merge lp:~openerp-dev/openobject-addons/6.1-opw-575865-nep into lp:openobject-addons/6.1

Proposed by Nehal Panchal (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-575865-nep
Merge into: lp:openobject-addons/6.1
Diff against target: 21 lines (+3/-1)
1 file modified
account_voucher/account_voucher.py (+3/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-575865-nep
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+111360@code.launchpad.net

Description of the change

Hello,

Cannot pay foreign currency invoices with foreign currency vouchers.

This fixes the issue.

Thanks.

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

Hello,

This bug was qualified as Already Fixed on Trunk (means that it was already fixed and merged in Trunk). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6855. By Nehal Panchal (OpenERP)

[FIX] account_voucher :Can't pay foreign currency invoices with foreign currency vouchers

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2012-03-30 11:07:16 +0000
+++ account_voucher/account_voucher.py 2012-06-21 09:15:03 +0000
@@ -1023,6 +1023,8 @@
1023 currency_rate_difference = line.move_line_id.amount_residual - amount1023 currency_rate_difference = line.move_line_id.amount_residual - amount
1024 else:1024 else:
1025 currency_rate_difference = 0.01025 currency_rate_difference = 0.0
1026 if voucher_brw.type in ('purchase', 'payment'):
1027 currency_rate_difference = -1 * currency_rate_difference
1026 move_line = {1028 move_line = {
1027 'journal_id': voucher_brw.journal_id.id,1029 'journal_id': voucher_brw.journal_id.id,
1028 'period_id': voucher_brw.period_id.id,1030 'period_id': voucher_brw.period_id.id,
@@ -1081,7 +1083,7 @@
1081 # otherwise we use the rates of the system (giving the voucher date in the context)1083 # otherwise we use the rates of the system (giving the voucher date in the context)
1082 amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx)1084 amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx)
1083 if line.amount == line.amount_unreconciled and line.move_line_id.currency_id.id == voucher_currency:1085 if line.amount == line.amount_unreconciled and line.move_line_id.currency_id.id == voucher_currency:
1084 foreign_currency_diff = line.move_line_id.amount_residual_currency + amount_currency1086 foreign_currency_diff = abs(line.move_line_id.amount_residual_currency) - abs(amount_currency)
10851087
1086 move_line['amount_currency'] = amount_currency1088 move_line['amount_currency'] = amount_currency
1087 voucher_line = move_line_obj.create(cr, uid, move_line)1089 voucher_line = move_line_obj.create(cr, uid, move_line)