[FIX] regenerate action's views key if it is empty, not just if it's absent
authorXavier Morel <xmo@openerp.com>
Mon, 12 Dec 2011 10:11:21 +0000 (11:11 +0100)
committerXavier Morel <xmo@openerp.com>
Mon, 12 Dec 2011 10:11:21 +0000 (11:11 +0100)
lp bug: https://launchpad.net/bugs/903062 fixed

bzr revid: xmo@openerp.com-20111212101121-ljjmq6phxgse0qjq

addons/web/controllers/main.py

index 27cde36..397a6a0 100644 (file)
@@ -604,7 +604,7 @@ def fix_view_modes(action):
     :param dict action: an action descriptor
     :returns: nothing, the action is modified in place
     """
-    if 'views' not in action:
+    if not action.get('views'):
         generate_views(action)
 
     id_form = None