Payment Invoice is not considering the currency in Invoice

Bug #697080 reported by Cristian Salamea
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 3

Bug Description

This test at v6 RC2

Create an Invoice
Choice a different Currency, USD for example
Add product
Validate the Invoice
Click on Pay Invoice

Here the Voucher Form is opened and in default_amount is the amount_residual from Invoice code confirm this:

At line 16 here : http://paste.pocoo.org/show/314287/ you can see how the default_amount by default with inv.residual what is wrong if you are working in Multi-currency invoice you *must* consider this

Best regards,

Related branches

Revision history for this message
Cristian Salamea (ovnicraft) wrote :
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

Thanks for the report, but your patch is false.

The currency of the payment is given by the journal, not by the user's company. The ideal would be to select a journal as a default value in the same currency than the invoice, otherwise do the conversion according to the journal currency.

Revision history for this message
Frederic Clementi - Camptocamp (frederic-clementi) wrote :

Keep in mind that when you pay an invoice based in USD with your EUR account for example, you will post in your books the debit amount that you effectively see on your bank statement/e-banking which is barely based the same exchange rate than the one your are using in OpenERP (+ bank fees impact as well).

I agree that it strange that the default amount is always at invoice currency in the case you are paying in a different currency but this amount will only be indicative and will be modified anyway.

In my opinion, if you leave it blank it is probably less confusing, don't you think?

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

@Fabien i am agree with ideal functionality but now your are giving to voucher the residual what has nothing with item journal generated when validate the invoice.
I get this:
Supplier Invoice in USD with Total: 6417
Entry journal Generated: Creditor vs Expenses with 5000 EUR
keep in mind that Pay button in invoice is for *pay* only *that* invoice total or partial, how works now, voucher lines amount(their amounts are in EUR) are loaded with default_amount as reference what 6417 has nothing with 5000 EUR Creditors generated from invoice.

I suggest, pass the residual invoice in Invoice currency (USD for this example), in voucher loaded the Journal what get this currency if it'is not found make the conversion and load the journal with default currency company.

Regards,

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

@Fabien user will does the selection of journal? i think it must be automatically.

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

@Frederic left it blank off course is less confusing but user wants to pay *that* invoice, values are in residual and system must make it simple for him.

And i think the voucher detail by default must be load the lines from *that* invoice.

Regards,

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

We Let the addons3 team decide.

Thanks.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
status: New → Triaged
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

we keep the residual amount of the invoice, as it's most convenient for more people (anyone that doesn't use multi-currency)

we can do like this: make default value of journal of voucher as the first journal of the list with the same currency as the invoice (if different than the company one)
means: if you company is in EUR, you make an invoice in USD => whenever you click on "pay" it opens a new voucher with residual amount (as now) but with a journal with currency = USD if any (otherwise it's the same behavior as now)

thanks
mra

Changed in openobject-addons:
status: Triaged → Confirmed
importance: Undecided → Medium
milestone: none → 6.0
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

@Mustafa thanks for do it.

Regards,

Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote :

Hello All,

I have improved the code as suggested by Mustufa (#8) in lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2.

Revision No: 4612
Revision ID:<email address hidden>

Thanks
PSI

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
jlinkels (jlinkels) wrote :

I am a little bit lost what exactly what was fixed.

I have a made a purchase in EUR. Say EUR 100
My company is in USD

When want to pay the invoice, the open amount is USD 128.30 <-- Correct
But the proposed amount to pay is 100
When I would pay like this, I would pay USD 100

Why not show the open amount in USD (correct as it is now)
Propose the amount to pay also in USD.

Like it is proposed now, the user has always to correct the proposed amount. That is confusing and error prone.
Not that this is the bug as originally described in this bug report.
I am unsure as what was the intended policy on t his after the fix

jlinkels

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.