From 76ca7ebec84464b6a66b427b353193e98def6e8b Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Fri, 12 Jun 2020 23:34:58 +0200 Subject: [PATCH] [FIX] access to ir.module.module should be done with sudo --- pos_payment_change/models/pos_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos_payment_change/models/pos_config.py b/pos_payment_change/models/pos_config.py index 199791e1..2b6d1a78 100644 --- a/pos_payment_change/models/pos_config.py +++ b/pos_payment_change/models/pos_config.py @@ -31,7 +31,7 @@ class PosConfig(models.Model): def _check_payment_change_policy(self): # Check if certification module is installed # and if yes, if 'update payments' option is allowed - module_states = self.env["ir.module.module"].search([ + module_states = self.env["ir.module.module"].sudo().search([ ("name", "=", "l10n_fr_certification")] ).mapped("state") if "installed" not in module_states: