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
return (ml.location_id.id, ml.lot_id.id, ml.package_id.id, ml.owner_id.id)
                    grouped_move_lines_out = {}
                    for k, g in groupby(sorted(move_lines_out_done, key=_keys_out_sorted), key=itemgetter(*keys_out_groupby)):
                        qty_done = 0
                        for ml in g:
                            qty_done += ml.product_uom_id._compute_quantity(ml.qty_done, ml.product_id.uom_id)
                        grouped_move_lines_out[k] = qty_done
                    for k, g in groupby(sorted(move_lines_out_reserved, key=_keys_out_sorted), key=itemgetter(*keys_out_groupby)):
                        grouped_move_lines_out[k] = sum(self.env['stock.move.line'].concat(*list(g)).mapped('product_qty'))
                    available_move_lines = {key: grouped_move_lines_in[key] - grouped_move_lines_out.get(key, 0) for key in grouped_move_lines_in.keys()}
                    # 
                    available_move_lines = dict((k, v) for k, v in available_move_lines.items() if v)
                    if not available_move_lines:
                        continue
                    for move_line in move.move_line_ids.filtered(lambda m: m.product_qty):
                        if available_move_lines.get((move_line.location_id, move_line.lot_id, move_line.result_package_id, move_line.owner_id)):
                            available_move_lines[(move_line.location_id, move_line.lot_id, move_line.result_package_id, move_line.owner_id)] -= move_line.product_qty
                    for (location_id, lot_id, package_id, owner_id), quantity in available_move_lines.items():
                        need = move.product_qty - sum(move.move_line_ids.mapped('product_qty'))
                        taken_quantity = move._update_reserved_quantity(need, quantity, location_id, lot_id, package_id, owner_id)
                        if float_is_zero(taken_quantity, precision_rounding=move.product_id.uom_id.rounding):
                            continue
                        if need - taken_quantity == 0.0:
                            assigned_moves |= move
                            break
                        partially_available_moves |= move
        partially_available_moves.write({'state': 'partially_available'})
        assigned_moves.write({'state': 'assigned'})
        self.mapped('picking_id')._check_entire_pack()
    def _action_cancel(self):