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):

addons/purchase/purchase.py
return res
class ProductTemplate(models.Model):
    _name = 'product.template'
    _inherit = 'product.template'
    @api.model
    def _get_buy_route(self):
        buy_route = self.env.ref('purchase.route_warehouse0_buy')
        if buy_route:
            return buy_route.ids
        return []
    @api.multi
    def _purchase_count(self):
        for template in self:
            template.purchase_count = sum([p.purchase_count for p in template.product_variant_ids])
        return True
    property_account_creditor_price_difference = fields.Many2one(
        'account.account', string="Price Difference Account", company_dependent=True,
        help="This account will be used to value price difference between purchase price and cost price.")
    purchase_ok = fields.Boolean('Can be Purchased', default=True)
    purchase_count = fields.Integer(compute='_purchase_count', string='# Purchases')
    purchase_method = fields.Selection([
        ('purchase', 'On ordered quantities'),
        ('receive', 'On received quantities'),
        ], string="Control Purchase Bills", default="receive")
    route_ids = fields.Many2many(default=lambda self: self._get_buy_route())
class ProductProduct(models.Model):
    _name = 'product.product'
    _inherit = 'product.product'
    @api.multi
    def _purchase_count(self):