From 4a2255c8d6ee05a857b17c4867b0cf85ae70cde7 Mon Sep 17 00:00:00 2001 From: Guillem Barba Date: Tue, 10 Feb 2015 19:12:32 +0100 Subject: [PATCH] Don't remove elements from tuple on group's menu_access field The changeSet 2a7d6a7e5c59 modified the returning of get() method of Many2Many fields, from dictionary of list to dictionary of tuples. issue4542 review14971002 --- trytond/res/group.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/trytond/res/group.py b/trytond/res/group.py index b1ef208c27..03772c8c47 100644 --- a/trytond/res/group.py +++ b/trytond/res/group.py @@ -24,10 +24,8 @@ class MenuMany2Many(fields.Many2Many): ('id', 'in', sub_ids), ]))) menu_ids = set(chain(*test_ids)) - for ids in res.itervalues(): - for id_ in ids[:]: - if id_ not in menu_ids: - ids.remove(id_) + for group_id, ids in res.iteritems(): + res[group_id] = tuple(id_ for id_ in ids if id_ in menu_ids) return res