Impacted versions:
9.0 Community & 9.0 Enterprise

Steps to reproduce:
- Open up a V9 runbot
- Go to projects and click on the issues item, for example for the project 'Research & Development':
  ![image](https://cloud.githubusercontent.com/assets/6352350/13873686/65f2c31c-ecf3-11e5-917a-38df2832bd00.png)
- The project tasks view is opened in place of the project issues. (notice that this only happens every once in a while, about once in five attempts) Example:
  ![image](https://cloud.githubusercontent.com/assets/6352350/13873789/14798b64-ecf4-11e5-9b77-f2ad5d3a8adc.png)

Current behavior:
Every once in a while (about one out of five attempts) after clicking on the issues button it will open up the project tasks, not the issues.

Expected behavior:
When you click on the issues the view with all issues opens, not the view for all tasks.

addons/project_issue/project_issue.py
res = super(project, self).write(vals)
        if 'active' in vals:
            # ar
            issues = self.with_context(active_test=False).mapped('issue_ids')
            issues.write({'active': vals['active']})
        return res
class account_analytic_account(osv.Model):
    _inherit = 'account.analytic.account'
    _description = 'Analytic Account'
    _columns = {
        'use_issues': fields.boolean('Issues', help="Check this box to manage customer activities through this project"),
    }
    def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None):
        res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, date_start=date_start, context=context)
        if template_id and 'value' in res:
            template = self.browse(cr, uid, template_id, context=context)
            res['value']['use_issues'] = template.use_issues
        return res
    def _trigger_project_creation(self, cr, uid, vals, context=None):
        if context is None:
            context = {}
        res = super(account_analytic_account, self)._trigger_project_creation(cr, uid, vals, context=context)
        return res or (vals.get('use_issues') and not 'project_creation_in_progress' in context)
    def unlink(self, cr, uid, ids, context=None):
        proj_ids = self.pool['project.project'].search(cr, uid, [('analytic_account_id', 'in', ids)])
        has_issues = self.pool['project.issue'].search(cr, uid, [('project_id', 'in', proj_ids)], count=True, context=context)
        if has_issues:
            raise UserError(_('Please remove existing issues in the project linked to the accounts you want to delete.'))
        return super(account_analytic_account, self).unlink(cr, uid, ids, context=context)
class project_project(osv.Model):