multi-currency sales and purchase receipts generate wrong journal items

Bug #1083534 reported by Leonardo Pistone
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP R&D Addons Team 3

Bug Description

Observed on runbot in latest 6.1:
(Build 274)
server (3643)
addons (5377)
web (4890)

and trunk:
(Build 273)
server (4601)
addons (8141)
web (3502)

To reproduce:
Install a DB with demo data (in my case, base currency is EUR)
Create a sale journal with a different currency (e.g. CHF)
Create a sale receipt, choose the sale journal in CHF and enter a line with amount 100. If you post the voucher, the generated journal items are wrong:
Account Receivable, debit: 100, amount_currency 100
Revenue Account, credit: 100, amount_currency -130

Instead, I am expecting to find:
Account Receivable, debit: 77, amount_currency 100
revenue account, credit:77 amount_currency: 100

same thing happens for purchase receipt

I found a workaround for this: if I add to the sales (resp. purchase) receipt form view the field
<field name="payment_rate_currency_id" invisible="True"/>
then everything seems to work fine. I tested this on 6.1.

Thanks!

Related branches

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Leonardo,

You are absolutely correct. The debit and credit amount should be in company currency.

When you create a sale/purchase receipt then it's amount should be on journal's currency. And debit, credit amount should be in company currency.

So your suggestion is correct, it should be like

Account Receivable, debit: 77, amount_currency 100
revenue account, credit:77 amount_currency: 100.

But your patch doesn't fix it, Anyways I am confirming this as a bug and assign to out R@D team.

Thanks for the pointing out...!!

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
SnippetBucket.com (tta-openerp) wrote :

Hello,

I have checked issue and found field 'paid_amount_in_company_currency' missing in form view.

 * Where field 'paid_amount_in_company_currency' play important role during multi-currency calculation.

Fixed:

 * It has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1083534-tta
 * Revision ID : <email address hidden>

  It will be available soon in trunk.

Thanks,
tta

Changed in openobject-addons:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.