diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 755e4777eca..cae12ddbfe7 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -156,7 +156,6 @@ class share_create(osv.osv_memory): def _setup_action_and_shortcut(self, cr, uid, wizard_data, user_ids, new_users, context=None): user_obj = self.pool.get('res.users') - menu_action_id = user_obj._get_menu(cr, uid, context=context) values = { 'name': (_('%s (Shared)') % wizard_data.action_id.name)[:64], 'domain': wizard_data.domain, @@ -169,9 +168,11 @@ class share_create(osv.osv_memory): for user_id in user_ids: action_id = self._create_shortcut(cr, user_id, values) if new_users: + # We do this only for new share users, as existing ones already have their initial home + # action. Resetting to the default menu does not work well as the menu is rather empty + # and does not contain the shortcuts in most cases. user_obj.write(cr, 1, [user_id], {'action_id': action_id}) - else: - user_obj.write(cr, 1, [user_id], {'action_id': menu_action_id}) + def _get_recursive_relations(self, cr, uid, model, ttypes, relation_fields=None, suffix=None, context=None): """Returns list of tuples representing recursive relationships of type ``ttypes`` starting from