Tryton - Issues

 

Issue7166

Title Display error on searching product when no rate found for currency
Priority bug Status invalid
Superseder Nosy List ced, mrichez, tbruyere
Type behavior Components currency
Assigned To Keywords
Reviews

Created on 2018-02-23.11:54:14 by mrichez, last changed by ced.

Files
File name Uploaded Type Edit Remove
Sélection_089.png mrichez, 2018-02-23.11:54:14 image/png
Messages
msg39583 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-31.00:28:15
Indeed I do not think msg38616 is the right solution because after selecting a product, there is again an error because the on_change_product call get_sale_price.
A solution would be to limit the selection of currency to only currencies with a rate for the sale date. But such domain will be expensive because it will have to search on all rates which can be a vary big table (if rates are encoded every day).

Indeed I find that both client behaves quite well in this case. They just show error message for each action that fails but they stay workable. The user has all the information to understand what is happening and that he must set a currency rate.
I do not think we can manage all exceptional cases without ending with a big try/except anything. I prefer a software that fails when some configuration is wrong than a software that silently hide all issues.

So I propose to close this issue as invalid, re-open it if you do not agree.
msg38616 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-26.17:26:24
Indeed it is quite similar to issue6634, Product.get_sale_price_uom should not raise the error from Currency.compute call in get_sale_price.
It could just catch UserError until we have finer grain exceptions.
msg38579 (view) Author: [hidden] (mrichez) Date: 2018-02-23.11:54:14
Let's take a currency without currency rate (other than company's currency)
When creating a sale or a purchase in this currency, if you click on the search icon on the One2Many Product field (sale or product line), you get first an error message "No rate found for currency..." but then it displays a kind of empty list form (lines are there but without data displayed) and if you click on ok, one of product is select. This screen should not be displayed after error message or list should be really empty...
See screenshot with empty list with invisibles lines
History
Date User Action Args
2018-03-31 00:28:16cedsetstatus: chatting -> invalid
type: behavior
messages: + msg39583
2018-02-26 17:26:24cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg38616
2018-02-23 11:54:14mrichezcreate