summaryrefslogtreecommitdiff
path: root/addons/base_setup/data
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-04-18 13:53:09 +0000
committerMartin Trigaux <mat@odoo.com>2019-04-18 13:53:09 +0000
commita7c774849c000a7910d4db3d026cb9569297dc21 (patch)
tree268a474bd45b9e1ea96c193eee696a75dac4c43c /addons/base_setup/data
parent2785b04586f40c5d0a8135991ee36123f1be8192 (diff)
[FIX] base_setup: do not create deleted parameter
The base_setup.show_effect parameter is created at module installation (with an external id) and is removed (and its external id) when the option "Show Effect" is unchecked from the general setting. When this option is checked again, the ir.config.parameter entry is recreated but without an external id (as it is user-provided data, not from a data file). When the module base_setup is updated, the record base_setup.show_effect is recreated and the unicity constraint on ir.config.parameter is raised. Set the record as forcecreate="False" to avoid recreating it when the module is updated. Anyway, if somebody uncheck the option, it is not expected to get it back when the module is upgraded. Fixes odoo/odoo#32806 closes odoo/odoo#32808 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/base_setup/data')
-rw-r--r--addons/base_setup/data/base_setup_data.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/base_setup/data/base_setup_data.xml b/addons/base_setup/data/base_setup_data.xml
index 6499d00add4..e0d02590384 100644
--- a/addons/base_setup/data/base_setup_data.xml
+++ b/addons/base_setup/data/base_setup_data.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
- <record model="ir.config_parameter" id="show_effect">
+ <record model="ir.config_parameter" id="show_effect" forcecreate="False">
<field name="key">base_setup.show_effect</field>
<field name="value">True</field>
</record>