Merge lp:~openerp-dev/openobject-addons/6.1-opw-590373-dhs into lp:openobject-addons/6.1

Proposed by Dhruti Shastri(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-590373-dhs
Merge into: lp:openobject-addons/6.1
Diff against target: 20 lines (+2/-1)
1 file modified
account_voucher/account_voucher.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-590373-dhs
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+155939@code.launchpad.net

Description of the change

OpenERP v6.1 . Home currency is EUR.
Create USD bank account and did the following steps:

Input a customer payment USD 1,000 without reconcile with any sales
invoice. Validate this payment.
Then I got the following entries which have two positive 1,000 in Amount
Currency.

To post a comment you must log in.

Unmerged revisions

7195. By Dhruti Shastri(OpenERP)

[account_voucher] : Payment in foreign currency with no Sign (case: 590373)

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-12-05 17:57:01 +0000
+++ account_voucher/account_voucher.py 2013-03-28 11:47:23 +0000
@@ -1152,6 +1152,7 @@
1152 account_id = voucher_brw.partner_id.property_account_receivable.id1152 account_id = voucher_brw.partner_id.property_account_receivable.id
1153 else:1153 else:
1154 account_id = voucher_brw.partner_id.property_account_payable.id1154 account_id = voucher_brw.partner_id.property_account_payable.id
1155 sign = voucher_brw.type == 'payment' and -1 or 1
1155 move_line = {1156 move_line = {
1156 'name': write_off_name or name,1157 'name': write_off_name or name,
1157 'account_id': account_id,1158 'account_id': account_id,
@@ -1160,7 +1161,7 @@
1160 'date': voucher_brw.date,1161 'date': voucher_brw.date,
1161 'credit': diff > 0 and diff or 0.0,1162 'credit': diff > 0 and diff or 0.0,
1162 'debit': diff < 0 and -diff or 0.0,1163 'debit': diff < 0 and -diff or 0.0,
1163 'amount_currency': company_currency <> current_currency and voucher_brw.writeoff_amount or False,1164 'amount_currency': company_currency <> current_currency and (sign * -1 * voucher_brw.writeoff_amount) or False,
1164 'currency_id': company_currency <> current_currency and current_currency or False,1165 'currency_id': company_currency <> current_currency and current_currency or False,
1165 'analytic_account_id': voucher_brw.analytic_id and voucher_brw.analytic_id.id or False,1166 'analytic_account_id': voucher_brw.analytic_id and voucher_brw.analytic_id.id or False,
1166 }1167 }