shopinvader / odoo-shopinvader

Odoo Modules. Sorry Magento, Shopinvader is coming
GNU Affero General Public License v3.0
121 stars 104 forks source link

[13.0] [14.0] No partner duplicate setting always shown as enabled #1114

Closed jbaudoux closed 3 years ago

jbaudoux commented 3 years ago

If there is no ir.config.parameter for "shopinvader.no_partner_duplicate", duplicate partner emails are allowed. As nothing ensure to put such value at module install (or update), by default duplicates are allowed. As there is a default on the config settings Boolean set to True, the setting will always be shown as enabled while it could be in fact disabled. Note: on a config setting, when a Boolean is unflagged, the key & value are removed from the settings (ir.config_parameter)

image

This is likely due to the recent change herre: https://github.com/shopinvader/odoo-shopinvader/pull/1059

Todo: Remove the default True from the config settings Boolean. Set the key in ir.config_parameter to True on module install or change the setting to "Allow partner email duplicates" instead of "No partner duplicate" Eventually create a migration script to recover the setting value that was in shopinvader.config.settings

cc @ivantodorovich @simahawk @rousseldenis

ivantodorovich commented 3 years ago

Hello! Indeed this is wrong

Anyway the default=True comes back from https://github.com/shopinvader/odoo-shopinvader/commit/bf75c3f8a0746d2155479f45417365e5f9097d94

Fixes here: