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
from datetime import datetime
from dateutil.relativedelta import relativedelta
from openerp import api, fields, models, _, SUPERUSER_ID
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools.translate import _
from openerp.tools.float_utils import float_is_zero, float_compare
import openerp.addons.decimal_precision as dp
from openerp.exceptions import UserError, AccessError
class PurchaseOrder(models.Model):
    _name = "purchase.order"
    _inherit = ['mail.thread', 'ir.needaction_mixin']
    _description = "Purchase Order"
    _order = 'date_order desc, id desc'
    @api.depends('order_line.price_total')
    def _amount_all(self):
        for order in self:
            amount_untaxed = amount_tax = 0.0
            for line in order.order_line:
                amount_untaxed += line.price_subtotal
                amount_tax += line.price_tax
            order.update({
                'amount_untaxed': order.currency_id.round(amount_untaxed),
                'amount_tax': order.currency_id.round(amount_tax),
                'amount_total': amount_untaxed + amount_tax,
            })
    @api.depends('order_line.date_planned')
    def _compute_date_planned(self):