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
# re
        # re
        # re
        self.assertEqual(len(picking_pick.move_lines.move_orig_ids), 0, 'Picking pick should not have origin moves')
        self.assertEqual(set(picking_pick.move_lines.move_dest_ids.ids), set((picking_pack.move_lines | return_pick_picking.move_lines).ids))
        self.assertEqual(set(picking_pack.move_lines.move_orig_ids.ids), set(picking_pick.move_lines.ids))
        self.assertEqual(set(picking_pack.move_lines.move_dest_ids.ids), set((picking_ship.move_lines | return_pack_picking.move_lines).ids))
        self.assertEqual(set(picking_ship.move_lines.move_orig_ids.ids), set(picking_pack.move_lines.ids))
        self.assertEqual(set(picking_ship.move_lines.move_dest_ids.ids), set(return_ship_picking.move_lines.ids))
        self.assertEqual(set(return_ship_picking.move_lines.move_orig_ids.ids), set(picking_ship.move_lines.ids))
        self.assertEqual(set(return_ship_picking.move_lines.move_dest_ids.ids), set(return_pack_picking.move_lines.ids))
        self.assertEqual(set(return_pack_picking.move_lines.move_orig_ids.ids), set((picking_pack.move_lines | return_ship_picking.move_lines).ids))
        self.assertEqual(set(return_pack_picking.move_lines.move_dest_ids.ids), set(return_pick_picking.move_lines.ids))
        self.assertEqual(set(return_pick_picking.move_lines.move_orig_ids.ids), set((picking_pick.move_lines | return_pack_picking.move_lines).ids))
        self.assertEqual(len(return_pick_picking.move_lines.move_dest_ids), 0)
    def test_put_in_pack(self):
        """ In a pick pack ship scenario, create two packs in pick and check that
        they are correctly recognised and handled by the pack and ship picking.
        Along this test, we'll use action_toggle_processed to process a pack
        from the entire_package_ids one2many and we'll directly fill the move
        lines, the latter is the behavior when the user did not enable the display
        of entire packs on the picking type.
        """
        picking_pick, picking_pack, picking_ship = self.create_pick_pack_ship()
        ship_move = self.env['stock.move'].create({
            'name': self.productB.name,
            'product_id': self.productB.id,
            'product_uom_qty': 4,
            'product_uom': self.productB.uom_id.id,
            'picking_id': picking_ship.id,