From d6b0995feddab4651f99b9b16d99c5d7e484505f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Sun, 13 Aug 2017 14:09:04 +0200 Subject: [PATCH] [FIX] missing sudo in server_environment_ir_config_param Without this sudo get_param would fail when the first user reading a parameter that has changed in the configuration file does not have write access to system parameters. --- server_environment_ir_config_parameter/__manifest__.py | 2 +- .../models/ir_config_parameter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server_environment_ir_config_parameter/__manifest__.py b/server_environment_ir_config_parameter/__manifest__.py index 20b357f34..a48e34a0b 100644 --- a/server_environment_ir_config_parameter/__manifest__.py +++ b/server_environment_ir_config_parameter/__manifest__.py @@ -6,7 +6,7 @@ 'name': 'Server Environment Ir Config Parameter', 'summary': """ Override System Parameters from server environment file""", - 'version': '10.0.1.0.0', + 'version': '10.0.1.0.1', 'license': 'AGPL-3', 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', 'website': 'https://odoo-community.org/', diff --git a/server_environment_ir_config_parameter/models/ir_config_parameter.py b/server_environment_ir_config_parameter/models/ir_config_parameter.py index 61116360d..ea52aec8e 100644 --- a/server_environment_ir_config_parameter/models/ir_config_parameter.py +++ b/server_environment_ir_config_parameter/models/ir_config_parameter.py @@ -28,7 +28,7 @@ class IrConfigParameter(models.Model): # should we have preloaded values in database at, # server startup, modules loading their parameters # from data files would break on unique key error. - self.set_param(key, cvalue) + self.sudo().set_param(key, cvalue) value = cvalue if value is None: return default