Files
odoo_source/addons/web_dashboard/static/src
Xavier Morel 9b6e1a876f [FIX] priorities when selecting view modes in dashboard
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
2012-05-18 10:51:05 +02:00
..
2011-12-23 15:46:56 +01:00