> The goal of this function is to create the move line to manage rounding
> difference, transitory difference but when it is call the currency conversion
> has been done upstream and the move we want to adjust is already in "holding"
> currency.
I don't speak about currency conversion.
You have to use `is_zero` on the holding's currency instead of `openerp.tools.float_is_zero`.
Here is the method I speak about:
def is_zero(self, cr, uid, currency, amount):
"""Returns true if ``amount`` is small enough to be treated as
zero according to ``currency``'s rounding rules.
Warning: ``is_zero(amount1-amount2)`` is not always equivalent to ``compare_amounts(amount1,amount2) == 0``, as the former will round after computing the difference, while the latter will round before, giving different results for e.g. 0.006 and 0.002 at 2 digits precision.
:param browse_record currency: currency for which we are rounding
:param float amount: amount to compare with currency's zero
"""
return float_is_zero(amount, precision_rounding=currency.rounding)
> The goal of this function is to create the move line to manage rounding
> difference, transitory difference but when it is call the currency conversion
> has been done upstream and the move we want to adjust is already in "holding"
> currency.
I don't speak about currency conversion.
You have to use `is_zero` on the holding's currency instead of `openerp. tools.float_ is_zero` .
Here is the method I speak about:
def is_zero(self, cr, uid, currency, amount):
"""Returns true if ``amount`` is small enough to be treated as
zero according to ``currency``'s rounding rules.
Warning: ``is_zero( amount1- amount2) `` is not always equivalent to
``compare_ amounts( amount1, amount2) == 0``, as the former will round after
computing the difference, while the latter will round before, giving
different results for e.g. 0.006 and 0.002 at 2 digits precision.
:param browse_record currency: currency for which we are rounding zero(amount, precision_ rounding= currency. rounding)
:param float amount: amount to compare with currency's zero
"""
return float_is_