summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odoo/addons/base/models/res_users.py5
-rw-r--r--odoo/modules/loading.py1
2 files changed, 6 insertions, 0 deletions
diff --git a/odoo/addons/base/models/res_users.py b/odoo/addons/base/models/res_users.py
index abdac34ce09..b605362853a 100644
--- a/odoo/addons/base/models/res_users.py
+++ b/odoo/addons/base/models/res_users.py
@@ -18,6 +18,7 @@ from lxml.builder import E
import passlib.context
from odoo import api, fields, models, tools, SUPERUSER_ID, _
+from odoo.addons.base.models.ir_model import MODULE_UNINSTALL_FLAG
from odoo.exceptions import AccessDenied, AccessError, UserError, ValidationError
from odoo.http import request
from odoo.osv import expression
@@ -1085,6 +1086,10 @@ class GroupsView(models.Model):
""" Modify the view with xmlid ``base.user_groups_view``, which inherits
the user form view, and introduces the reified group fields.
"""
+ if self._context.get('install_filename') or self._context.get(MODULE_UNINSTALL_FLAG):
+ # skip now; it will be updated once at the end of (un)installation
+ return
+
# remove the language to avoid translations, it will be handled at the view level
self = self.with_context(lang=None)
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py
index e9c215dc49b..070bd325d18 100644
--- a/odoo/modules/loading.py
+++ b/odoo/modules/loading.py
@@ -527,6 +527,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
# STEP 6: verify custom views on every model
if update_module:
env = api.Environment(cr, SUPERUSER_ID, {})
+ env['res.groups']._update_user_groups_view()
View = env['ir.ui.view']
for model in registry:
try: