From 04602995490b623e3e30b88386fe4bc673ce9002 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Wed, 24 Aug 2016 11:51:15 +0200 Subject: [PATCH] [FIX] base: Always call '_update_user_groups_view' when updating a res_group Since abdca55ea2f5a4296ef46d3b9562a21eb955272f, the call to '_update_user_groups_view' if made only if the category_id is modified on a res_group. This method is re-computing the xml for the group_ids on res_user form view. This modification is wrong because: - If the name or the share fields are modified too, the view should be recomputed too. - It introduce a bug which is the following. When creating a new instance with no demo data, the method is not called and the group_ids field is still displayed as a one2many of the res_groups instead of the prettier way to display the information we're used to. --- openerp/addons/base/res/res_users.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_users.py b/openerp/addons/base/res/res_users.py index 8ebb0904963..9e3d2866b09 100644 --- a/openerp/addons/base/res/res_users.py +++ b/openerp/addons/base/res/res_users.py @@ -678,8 +678,7 @@ class GroupsView(models.Model): @api.multi def write(self, values): res = super(GroupsView, self).write(values) - if 'category_id' in values: - self._update_user_groups_view() + self._update_user_groups_view() # ir_values.get_actions() depends on action records self.env['ir.values'].clear_caches() return res