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.

_inherit = 'project.project'
    _columns = {
        'label_issues': fields.char('Use Issues as', help="Customize the issues label, for example to call them cases."),
    }
    _defaults = {
        'use_issues': True,
        'label_issues': 'Issues',
    }
    def _check_create_write_values(self, cr, uid, vals, context=None):
        """ Perform some check on values given to create or write. """
        # Ha
        if vals.get('use_tasks') and not vals.get('use_issues'):
            vals['alias_model'] = 'project.task'
        elif vals.get('use_issues') and not vals.get('use_tasks'):
            vals['alias_model'] = 'project.issue'
    def on_change_use_tasks_or_issues(self, cr, uid, ids, use_tasks, use_issues, context=None):
        values = {}
        if use_tasks and not use_issues:
            values['alias_model'] = 'project.task'
        elif not use_tasks and use_issues:
            values['alias_model'] = 'project.issue'
        return {'value': values}
    def create(self, cr, uid, vals, context=None):
        self._check_create_write_values(cr, uid, vals, context=context)
        return super(project_project, self).create(cr, uid, vals, context=context)
    def write(self, cr, uid, ids, vals, context=None):
        self._check_create_write_values(cr, uid, vals, context=context)
        return super(project_project, self).write(cr, uid, ids, vals, context=context)
class res_partner(osv.osv):