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
first_pack = picking_pick.put_in_pack()
        picking_pick.move_line_ids.filtered(lambda ml: ml.product_id == self.productB and ml.qty_done == 0.0).qty_done = 2.0
        second_pack = picking_pick.put_in_pack()
        picking_pick.button_validate()
        self.assertEqual(len(first_pack.quant_ids), 2)
        self.assertEqual(len(second_pack.quant_ids), 1)
        picking_pack.action_as()
        self.assertEqual(len(picking_pack.entire_package_ids), 2)
        output_sub_location = self.env['stock.location'].create({'name': 'sub1', 'location_id': self.output_location})
        picking_pack.entire_package_ids[0].with_context(
            {'picking_id': picking_pack.id, 'destination_location': output_sub_location.id}).action_toggle_processed()
        picking_pack.entire_package_ids[1].with_context(
            {'picking_id': picking_pack.id, 'destination_location': output_sub_location.id}).action_toggle_processed()
        self.assertEqual(picking_pack.move_line_ids[:1].location_dest_id, output_sub_location)
        picking_pack.button_validate()
        self.assertEqual(first_pack.location_id, output_sub_location)
        self.assertEqual(second_pack.location_id, output_sub_location)
        self.assertEqual(len(picking_pack.entire_package_ids), 2)
        picking_ship.action_as()
        self.assertEqual(picking_ship.move_line_ids[:1].location_id, output_sub_location)
        for move_line in picking_ship.move_line_ids:
            move_line.qty_done = move_line.product_uom_qty
        picking_ship.button_validate()
        quants_of_products_ab = self.env['stock.quant'].search([('product_id', 'in', (self.productA.id, self.productB.id))])
        quants_of_product_a = quants_of_products_ab.filtered(lambda q: q.product_id == self.productA)
        quants_of_product_b = quants_of_products_ab.filtered(lambda q: q.product_id == self.productB)
        self.assertEqual(quants_of_products_ab.mapped('location_id.id'), [self.customer_location])
        self.assertEqual(len(quants_of_product_a), 1)
        self.assertEqual(len(quants_of_product_b), 2)
    def test_merge_move_mto_mts(self):