[FIX] Correct floating number comparison for min_quantity orderpoint in scheduler

Fix basic floating point math issue in procurement scheduler when comparing
current quantity with orderpoint minimum quantity. In certain cases floating
point comparison could result in e.g 400.0 < 400.0 == True due to typical
floating point comparison issues, as Odoo doesn't use Decimal types where the
issue doesn't exist.
Use float_compare helper to solve this with floating point type.
print("%s" % (D(1) / D(3) * D(3))) : we will still need float_compare.

On Wed, Dec 3, 2014 at 2:07 PM, Mart Raudsepp <notifications@github.com>
wrote:

> In addons/stock/procurement.py:
>
> >                              continue
> >
> >                          qty -= orderpoint_obj.subtract_procurements(cr, uid, op, context=context)
> >
> > -                        if qty > 0:
> > +                        if float_compare(qty, 0.0, precision_rounding=op.product_uom.rounding) > 0:
>
> Just quantize at the appropriate spot.. and until then, the conversion
> result is more exact than floating point, e.g consider
> from decimal import Decimal as D
> print("%s" % D.from_float(1.0/3.0))
> print("%s" % (D(1) / D(3)))
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/odoo/odoo/pull/3346/files#r21229689>.
>