[FIX] do not remove 'multi=True' actions in fields_view_get for tree view

fields_view_get removed multi=True actions from the result of
ir_values.get_actions('client_action_multi', ...), so that multi
actions would not be displayed in the form view's sidebar in the GTK
client.

The web client has a sidebar in both cases, the GTK client just
ignores 'toolbar' key if not in tree view, so don't remove 'multi'
actions in tree view toolbar, to avoid having to perform one more RPC
call (explicit ir_values.get) in web client.

lp bug: https://launchpad.net/bugs/856378 fixed

bzr revid: xmo@openerp.com-20110929130701-65ubx1o0swk889nl
This commit is contained in:
Xavier Morel 2011-09-29 15:07:01 +02:00
parent a658311000
commit 22b1bb8abb
1 changed files with 3 additions and 2 deletions

View File

@ -2069,8 +2069,9 @@ class BaseModel(object):
context)
resprint = map(clean, resprint)
resaction = map(clean, resaction)
resaction = filter(lambda x: not x.get('multi', False), resaction)
resprint = filter(lambda x: not x.get('multi', False), resprint)
if view_type != 'tree':
resaction = filter(lambda x: not x.get('multi'), resaction)
resprint = filter(lambda x: not x.get('multi'), resprint)
resrelate = map(lambda x: x[2], resrelate)
for x in resprint + resaction + resrelate: