summaryrefslogtreecommitdiff
path: root/addons/process/process.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-05-18 10:51:05 +0200
committerXavier Morel <xmo@openerp.com>2012-05-18 10:51:05 +0200
commit9b6e1a876f80a961eacf7f0e163d8d714a36d796 (patch)
tree4c5aea20d17c3a3491b9a9f2a7da2e97c3c36524 /addons/process/process.py
parentf64b43b370de98f64acd61b9ebd89e690f6dbbb3 (diff)
[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
Diffstat (limited to 'addons/process/process.py')
0 files changed, 0 insertions, 0 deletions