Trouble rounding residual amount into invoice : may be a client trouble
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
High
|
vir (Open ERP) |
Bug Description
Hi !
On the last stable from today, the residual amount shown into the client is may be erroneous or the _amount_residual function of invoice.py is wrong. Depends on the point of view...
When you pay an invoice with pay invoice wizard with the values listed bellow, you get :
- Residual amount given by the _amount_residual function = 0,0096... This is perfectly correct according to computation.
- The value shown into the client is : 0,01.
According to the server settings and currency setting, this is wrong: I should see 0,00. So the question is here:
Should the _amount_residual function return 0,00 (even if it's not really the case) to have 0,00 shown into the client or should the client "cut" the number following the third floating number : 0,0096... => 0,00 ?
I think this should be corrected in the client, but may be I'm wrong...
Thanks for your opinion.
To reproduce it, do the following:
-------
Given I am loged as admin user with password admin used
And the company currency is set to EUR
And the following currency rate settings are:
|
|
|
|
|
And a cash journal in USD exists
And a cash journal in CHF exists
And a cash journal in EUR exists
Given I have recorded on the 1 jan 2009 a supplier invoice (in_invoice) of 1000,0 CHF without tax called MyFirstSupplier
When I press the valiate button
Then I should see the invoice MyFirstSupplier
And the residual amount = 1000,0
Given I have recorded on the 1 jan 2009 a supplier invoice (in_invoice) of 1000,0 CHF without tax called MySecondSupplie
When I press the valiate button
Then I should see the invoice MySecondSupplie
And the residual amount = 1000,0
Given I create a new bank statement called MyBankStatement with a CHF account journal
And I import on the 1 jan 2009, the following invoice : MyFirstSupplier
Then I should see an draft bank statement
Given I take the created invoice MySecondSupplie
When I call the Pay invoice wizard
And I completely pay the residual amount in CHF on the 13 sep 2009
Then I should see a residual amount of 0.0 CHF.-
Changed in openobject-addons: | |
assignee: | nobody → vir (Open ERP) (vir-tinyerp) |
Hello,
You need to set --price-accuracy=4 in the configuration.
If you are using Ubuntu then start the server from terminal with following way :
./openerp-server --addons- path=.. /../addons- 5.0.6 --price_accuracy=4
Hope this will help you.
Thanks.