Impacted versions:

**11.0**

Steps to reproduce:

Install a new db with demo data, and sale_stock module.  Set rounding for product unit of measure from 3 to 5.  Run sale_stock tests (from command line with --test-enable)

Current behavior:

> FAIL: test_02_sale_stock_return (odoo.addons.sale_stock.tests.test_sale_stock.TestSaleStock)
> 
> AssertionError: 3.0000000000000004 != 3.0 : Sale Stock: delivered quantity should be 3.0 instead of "3.0000000000000004" after picking return
> 

At the lowest level, it appears that float_round is called by  convert_to_cache.

- **float_round(3.0, precision_digits=x) == 3.0**, if x is 1, 2, 3, 4, 6, 7, 8, 9, 10
- **float_round(3.0, precision_digits=5) == 3.0000000000000004**



addons/sale_stock/tests/test_sale_stock.py
adv_wiz = self.env['sale.advance.payment.inv'].with_context(active_ids=[self.so.id]).create({
            'advance_payment_method': 'percentage',
            'amount': 5.0,
            'product_id': self.env.ref('sale.advance_product_0').id,
        })
        act = adv_wiz.with_context(open_invoices=True).create_invoices()
        inv = self.env['account.invoice'].browse(act['res_id'])
        self.assertEqual(inv.amount_untaxed, self.so.amount_untaxed * 5.0 / 100.0, 'Sale Stock: deposit invoice is wrong')
        self.assertEqual(self.so.invoice_status, 'to invoice', 'Sale Stock: so should be to invoice after invoicing deposit')
        
        self.so.action_invoice_create(final=True)
        self.assertEqual(self.so.invoice_status, 'invoiced', 'Sale Stock: so should be fully invoiced after second invoice')
        
        pick = self.so.picking_ids
        pick.force_assign()
        pick.move_lines.write({'quantity_done': 2})
        self.assertIsNone(pick.button_validate(), 'Sale Stock: complete delivery should not need a backorder')
        del_qties = [sol.qty_delivered for sol in self.so.order_line]
        del_qties_truth = [2.0 if sol.product_id.type in ['product', 'consu'] else 0.0 for sol in self.so.order_line]
        self.assertEqual(del_qties, del_qties_truth, 'Sale Stock: delivered quantities are wrong after partial delivery')
        
        with self.assertRaises(UserError):
            self.so.action_invoice_create()
    def test_02_sale_stock_return(self):
        """
        Test a SO with a product invoiced on delivery. Deliver and invoice the SO, then do a return
        of the picking. Check that a refund invoice is well generated.
        """