Skip to content

Commit e40f4f9

Browse files
committed
signals: Search installed receivers using a privileged user.
Otherwise, when loading the logged user would not have access to the `ir.module.module` and this rather technical operation fail. Fixes OCA#1 Closes !1.
1 parent 0410eb9 commit e40f4f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openerp/signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def _installed(self, sender, receiver):
272272
module = get_object_module(receiver, typed=True)
273273
env = getattr(sender, 'env', None)
274274
if module and env:
275-
mm = env['ir.module.module']
275+
mm = env['ir.module.module'].sudo()
276276
query = [('state', '=', 'installed'), ('name', '=', module)]
277277
return bool(mm.search(query))
278278
else:

0 commit comments

Comments
 (0)