odoo/odoo — pull request #3486 by leio (2014-11-05 17:47:46+00:00)
Title: [FIX] Correct floating point handling in quants_reserve

Fix basic floating point math issue in stock.quant quants_reserve
when deciding whether the related stock.move can be moved from
confirmed or partially_available to assigned. In certain cases
of math involved, floating point equality comparison of equal numbers
could yield False due to typical IEEE 754 floating point issues,
because Odoo doesn't use Decimal types as it really should.
Use float_compare helper to solve this with floating point type.

The bug could for example show up as stock moves of quantity 30.0
getting assigned a 30.0 reserved quant, instead of moving straight to
assigned; or not marking it assigned when sufficient quants have been
reserved. That in turn results in Manufacturing Orders needing that
detail not moving from "Awaiting Raw Materials" to "Ready to Produce",
stalling the whole manufacturing pipeline and resulting in monetary
loss.