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 {}
    @api.multi
    def button_cancel(self):
        for order in self:
            for pick in order.picking_ids:
                if pick.state == 'done':
                    raise UserError(_('Unable to cancel purchase order %s as some receptions have already been done.') % (order.name))
            for inv in order.invoice_ids:
                if inv and inv.state not in ('cancel', 'draft'):
                    raise UserError(_("Unable to cancel this purchase order.i You must first cancel related vendor bills."))
            for pick in order.picking_ids.filtered(lambda r: r.state != 'cancel'):
                pick.action_cancel()
            if not self.env.context.get('cancel_procurement'):
                procurements = order.order_line.mapped('procurement_ids')
                procurements.filtered(lambda r: r.state not in ('cancel', 'exception') and r.rule_id.propagate).write({'state': 'cancel'})
                procurements.filtered(lambda r: r.state not in ('cancel', 'exception') and not r.rule_id.propagate).write({'state': 'exception'})
                moves = procurements.filtered(lambda r: r.rule_id.propagate).mapped('move_dest_id')
                moves.filtered(lambda r: r.state != 'cancel').action_cancel()
        self.write({'state': 'cancel'})
    @api.multi
    def button_done(self):
        self.write({'state': 'done'})
    @api.multi
    def _get_destination_location(self):
        self.ensure_one()
        if self.dest_address_id:
            return self.dest_address_id.property_stock_customer.id
        return self.picking_type_id.default_location_dest_id.id
    @api.model
    def _prepare_picking(self):