Skip to content

Commit

Permalink
[FIX] base_setup: do not create deleted parameter
Browse files Browse the repository at this point in the history
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 #32806

closes #32808

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
  • Loading branch information
mart-e committed Apr 18, 2019
1 parent 2785b04 commit a7c7748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/base_setup/data/base_setup_data.xml
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data noupdate="1"> <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="key">base_setup.show_effect</field>
<field name="value">True</field> <field name="value">True</field>
</record> </record>
Expand Down

0 comments on commit a7c7748

Please sign in to comment.