https://github.com/odoo/odoo/blob/b192431aeecc59b48898ce9c6f276b82d65cbfa6/addons/stock/models/stock_move.py#L1026

rounding_method ='UP'
I think it **need be changed to:**
rounding_method ='HALF-UP'

I get this message then I Verify new Delivery(stock.picking):

> The initial demand has been updated.
> My Product
> Quantity : 5.951 -> 5.949999999999999 

and
> The initial demand has been updated.
> My Product
> Quantity : 5.951 -> 5.951 


How I did it(you can also repeat this error): Create new Product > add Qty on hand > Create SO > Add Product with quantity 5.5 > Verify > open Delivery > add Delivered qty 5.95 > Verify > Get trouble: odoo change my qty to 5.951
![default](https://user-images.githubusercontent.com/34191760/39213952-9b246470-481b-11e8-8e06-a074b1044536.png)

You can try execute in python:
5.95 - 5.5 = 0.4500000000000002

Look at the code:
```
            extra_move_quantity = float_round(
                self.quantity_done - self.product_uom_qty,
                precision_rounding=self.product_uom.rounding,
                rounding_method ='UP')
```
if you setup parameters like this:
```
            0.451 = float_round(
                5.95 - 5.5,
                precision_rounding=self.product_uom.rounding,
                rounding_method ='UP')
```
Then you get 0.451.  This is wrong!
Try:
```
            0.45 = float_round(
                5.95 - 5.5,
                precision_rounding=self.product_uom.rounding,
                rounding_method ='HALF-UP')
```
0.45 = 5.95 - 5.5
addons/stock/tests/test_move2.py
'qty_done': 1.0,
            'lot_id': lot.id,
        })
        return_ship_picking.action_done()
        stock_return_picking = self.env['stock.return.picking']\
            .with_context(active_ids=picking_pack.ids, active_id=picking_pack.ids[0])\
            .create({})
        stock_return_picking.product_return_moves.quantity = 1.0
        stock_return_picking_action = stock_return_picking.create_returns()
        return_pack_picking = self.env['stock.picking'].browse(stock_return_picking_action['res_id'])
        return_pack_picking.move_lines[0].move_line_ids[0].qty_done = 1.0
        return_pack_picking.action_done()
        stock_return_picking = self.env['stock.return.picking']\
            .with_context(active_ids=picking_pick.ids, active_id=picking_pick.ids[0])\
            .create({})
        stock_return_picking.product_return_moves.quantity = 1.0
        stock_return_picking_action = stock_return_picking.create_returns()
        return_pick_picking = self.env['stock.picking'].browse(stock_return_picking_action['res_id'])
        return_pick_picking.move_lines[0].move_line_ids[0].qty_done = 1.0
        return_pick_picking.action_done()
        # No
        # +-
        # |         
        # | 
        # |         
        # +-
        # Re
        # pi
        # pi
        # pi