In the case of ``list`` view mode, code would fail to use provided
``views`` array (and therefore lose the view id), overriding it with
``[false, 'list']`` instead.
Original issue seemed to be that the dashboard's ``view_mode`` may
contain view names which are not in the original action's ``views``
array (?) in which case the _.find call returns ``undefined`` and then
blows up.
This was fixed by pre-checking the dashboard's view mode against the
action's view_mode, which is:
1. Wrong, as the action's view_mode will always contain ``tree`` never
``list``
2. Weird, why not fallback *instead of returning ``undefined``*?
So that's what was changed: instead of returning ``undefined`` the
mapping function now returns a default ``[false, mode]`` pair.
bzr revid: xmo@openerp.com-20120518085105-job3luim44ih6nps