Tryton - Issues

 

Issue7366

Title Sale reporting does not return any result when no currency rates are available
Priority bug Status invalid
Superseder Nosy List ced, pokoli, reviewbot
Type behavior Components sale
Assigned To pokoli Keywords review
Reviews 46381002
View: 46381002

Created on 2018-04-18.12:32:47 by pokoli, last changed by pokoli.

Messages
review46381002 updated at https://codereview.tryton.org/46381002/#ps2
msg40226 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-18.13:53:40
zero amount when rate is missing is still a value display that is wrong.
You just replaced a default rate of 1 by 0, it is still a guessing value.
I still prefer the current behavior.
msg40224 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-04-18.13:44:20
> So we can invalidate it.

Why? 

I've updated the review taking in account your comments. So when no currency rates are available zero amount is used and when the currency is the same as the company the 1.0 rate is used as no conversion is needed. For me this is the correct fix.
msg40223 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-18.13:42:07
So we can invalidate it.
msg40221 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-04-18.13:33:19
> Normally, we have a default rate for euro in currency.xml

This does not solve the problem as the database uses usd for company (and sales) currency.

> But maybe it should be improved by having a configuration wizard which ask what is the default currency and put a rate of 1 on it.

Probably, but for me this is a separate issue and won't fix this issue as the user may skip the configuration wizard.
msg40220 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-18.13:15:41
Normally, we have a default rate for euro in currency.xml
But maybe it should be improved by having a configuration wizard which ask what is the default currency and put a rate of 1 on it.
msg40219 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-04-18.13:05:17
I see your point and I agree that probably it's better to not display any instead of wrong values. 

The issue is that no data is shown despite the sales use the company currency which does not require any conversion.
review46381002 updated at https://codereview.tryton.org/46381002/#ps1
msg40217 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-18.13:00:37
I'm not sure if it is a bug. If there is not rate for the currency, it is probably better to not display value than display wrong values.
msg40216 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-04-18.12:32:46
I've created a new database and filled data using the demo script from tryton tools. I see the sales on the database but when opening the sale reporting (any report) it does not show any result.
History
Date User Action Args
2018-04-20 14:34:32pokolisetstatus: testing -> invalid
2018-04-18 13:54:47reviewbotsetmessages: + msg40227
2018-04-18 13:53:40cedsetmessages: + msg40226
2018-04-18 13:44:20pokolisetmessages: + msg40224
2018-04-18 13:42:07cedsetmessages: + msg40223
2018-04-18 13:33:20pokolisetmessages: + msg40221
2018-04-18 13:15:42cedsetmessages: + msg40220
2018-04-18 13:05:17pokolisetmessages: + msg40219
2018-04-18 13:01:01reviewbotsetnosy: + reviewbot
messages: + msg40218
2018-04-18 13:00:38cedsetnosy: + ced
messages: + msg40217

Showing 10 items. Show all history (warning: this could be VERY long)