Created on 2021-03-11.00:18:53 by albertca, last changed 1 month ago by ced.
On 2021-03-11 00:39, Albert Cervera i Areny wrote: > The problem appears also in _round(): > > https://hg.tryton.org/modules/currency/file/tip/currency.py#l160 I do not understand. > As it is called with self.rounding as factor: > > https://hg.tryton.org/modules/currency/file/tip/currency.py#l155 > > And if rounding is zero it crashes with a division by zero. It should be fixed by disabling the rounding. If the minimum amount of a currency is 0, then any value is valid.
The problem appears also in _round():
As it is called with self.rounding as factor:
And if rounding is zero it crashes with a division by zero.
Would it not be less intrusive to use absolute value in
is_zero. For me it is the only place where it fails.
Also this would allow to backport it as for me there is a bug.
Rounding field in currencies should have a domain that ensure that it is > 0.
|2021-03-11 10:05:02||ced||set||messages: + msg65351|
nosy: + reviewbot
|2021-03-11 00:39:09||albertca||set||messages: + msg65346|
nosy: + ced
priority: feature -> bug
type: feature request -> behavior
|2021-03-11 00:22:08||albertca||set||status: unread -> testing|
Showing 10 items. Show all history (warning: this could be VERY long)