[FIX] if an action descriptor does not have a view_type attribute, behave as if it was 'form'

bzr revid: xmo@openerp.com-20111021104312-0d21m130wkedabfn
This commit is contained in:
Xavier Morel 2011-10-21 12:43:12 +02:00
parent f5661001a6
commit 8773fca3a8
1 changed files with 1 additions and 1 deletions

View File

@ -526,7 +526,7 @@ def fix_view_modes(action):
if 'views' not in action:
generate_views(action)
if action.pop('view_type') != 'form':
if action.pop('view_type', 'form') != 'form':
return action
action['views'] = [