Impacted versions:

[9.0]
Tested in runbot http://174550-9-0-10dcec.runbot10.odoo.com/

Steps to reproduce:

Set the Tax Calculation Rounding Method to "Round Globally" 
Create a Sales Order with the following lines with 7% taxes

1) 5,095.20 
2) 523.20 
3) 80.64 
4) 54.12 
5) 182.00 
6) 186.20 
![image](https://cloud.githubusercontent.com/assets/16055718/19144073/309aa082-8bda-11e6-81d0-2461c4e9a467.png)

Create a Sales Invoice with the same lines with 7% taxes
![image](https://cloud.githubusercontent.com/assets/16055718/19144078/38048b58-8bda-11e6-9c2b-4b501cfa1e12.png)

Current behavior:

The total taxes in Sales Order are $477.48 

The total taxes in Sales Invoice are $477.50 

Expected behavior:

Both the total taxes in Sales Order and Sales Invoice should be 477.50 

Video/Screenshot link (optional):

result = super(AccountInvoice, self)._refund_cleanup_lines(lines)
        if self.env.context.get('mode') == 'modify':
            for i in xrange(0, len(lines)):
                for name, field in lines[i]._fields.iteritems():
                    if name == 'sale_line_ids':
                        result[i][2][name] = [(6, 0, lines[i][name].ids)]
                        lines[i][name] = False
        return result
class AccountInvoiceLine(models.Model):
    _inherit = 'account.invoice.line'
    sale_line_ids = fields.Many2many('sale.order.line', 'sale_order_line_invoice_rel', 'invoice_line_id', 'order_line_id', string='Sale Order Lines', readonly=True, copy=False)
class ProcurementOrder(models.Model):
    _inherit = 'procurement.order'
    sale_line_id = fields.Many2one('sale.order.line', string='Sale Order Line')
class ProductProduct(models.Model):
    _inherit = 'product.product'
    @api.multi
    def _sales_count(self):
        r = {}
        domain = [
            ('state', 'in', ['sale', 'done']),
            ('product_id', 'in', self.ids),
        ]
        for group in self.env['sale.report'].read_group(domain, ['product_id', 'product_uom_qty'], ['product_id']):
            r[group['product_id'][0]] = group['product_uom_qty']
        for product in self:
            product.sales_count = r.get(product.id, 0)
        return r
    sales_count = fields.Integer(compute='_sales_count', string='# Sales')
class ProductTemplate(models.Model):