diff options
| author | Raphael Collet <rco@odoo.com> | 2018-11-23 14:02:17 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2018-11-23 14:02:17 +0000 |
| commit | c96d4cdbadf8d15abcad19e8f5839b46bb025e04 (patch) | |
| tree | e26966ed9e8d8b75a05b86870b9a8c6515a5f871 | |
| parent | e181f592f33b2ae382569927537aed84689ee44f (diff) | |
[FIX] base: ormcache invalidation in `ir.config.parameter`
Writing on a parameter invalidates the ormcache and propagates the invalidation
to other workers. Setting a parameter to its current value should not trigger
ormcache invalidations.
| -rw-r--r-- | odoo/addons/base/models/ir_config_parameter.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/odoo/addons/base/models/ir_config_parameter.py b/odoo/addons/base/models/ir_config_parameter.py index eed10daadd8..b7f2356e803 100644 --- a/odoo/addons/base/models/ir_config_parameter.py +++ b/odoo/addons/base/models/ir_config_parameter.py @@ -83,7 +83,8 @@ class IrConfigParameter(models.Model): if param: old = param.value if value is not False and value is not None: - param.write({'value': value}) + if str(value) != old: + param.write({'value': value}) else: param.unlink() return old |
