diff --git a/addons/portal/portal.py b/addons/portal/portal.py index 9432b2a930c..5e18185c3e6 100644 --- a/addons/portal/portal.py +++ b/addons/portal/portal.py @@ -122,6 +122,16 @@ class portal(osv.osv): # set the parent_menu_id to item_id return self.write(cr, uid, ids, {'parent_menu_id': item_id}, context) + def onchange_group(self, cr, uid, ids, group_id, context=None): + """ update the users list when the group changes """ + user_ids = False + if group_id: + group = self.pool.get('res.groups').browse(cr, uid, group_id, context) + user_ids = [u.id for u in group.users] + return { + 'value': {'user_ids': user_ids} + } + def _res_xml_id(self, cr, uid, module, xml_id): """ return the resource id associated to the given xml_id """ data_obj = self.pool.get('ir.model.data') diff --git a/addons/portal/portal_view.xml b/addons/portal/portal_view.xml index e3b3a0a5f8c..5f9e8daf794 100644 --- a/addons/portal/portal_view.xml +++ b/addons/portal/portal_view.xml @@ -36,7 +36,8 @@ portal's users. - +