diff options
| author | Xavier Morel <xmo@openerp.com> | 2011-09-29 15:07:01 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2011-09-29 15:07:01 +0200 |
| commit | 22b1bb8abb0cb7148d0cbeadea1fe0aba2e11f97 (patch) | |
| tree | f6bee14ea1716c9d4fa5aa385c7da7a54490ba5c | |
| parent | a658311000e9ad5a7d078a562da3a9e716f2d4f3 (diff) | |
[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
| -rw-r--r-- | openerp/osv/orm.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 5a18b893910..7e3ffa7fcb0 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -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: |
