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
product1 = self.env['product.product'].create({
            'name': 'product a',
            'type': 'product',
            'categ_id': self.env.ref('product.product_category_all').id,
        })
        uom_unit = self.env.ref('product.product_uom_unit')
        wh = self.env['stock.warehouse'].search([('company_id', '=', self.env.user.id)], limit=1)
        # cr
        wh.write({'delivery_steps': 'pick_ship'})
        pick_ship_route = wh.route_ids.filtered(lambda r: 'Pick + Ship' in r.name)
        # cr
        procurement_group0 = self.env['procurement.group'].create({})
        pick_rule = pick_ship_route.pull_ids.filtered(lambda rule: 'Stock -> Output' in rule.name)
        push_rule = pick_ship_route.pull_ids - pick_rule
        pick_rule.write({
            'group_propagation_option': 'fixed',
            'group_id': procurement_group0.id,
        })
        stock_location = pick_rule.location_src_id
        ship_location = pick_rule.location_id
        customer_location = push_rule.location_id
        partners = self.env['res.partner'].search([], limit=2)
        partner0 = partners[0]
        partner1 = partners[1]
        procurement_group1 = self.env['procurement.group'].create({'partner_id': partner0.id})
        procurement_group2 = self.env['procurement.group'].create({'partner_id': partner1.id})
        move1 = self.env['stock.move'].create({
            'name': 'first out move',
            'procure_method': 'make_to_order',
            'location_id': ship_location.id,