I'd like to know if what I understand from my current issue is right or wrong (with Odoo 13)
I have a custom config parameters, a Boolean with a True default value.
Eg :
my_param = fields.Boolean(
string="My param",
config_parameter="my_module.my_param",
default=True
)
When I check the system parameters list, I can find him and in my front view I have a filled checkbox.
If from my view I change the value at False and save, the checkbox is still filled but the parameter disapear from my system parameters list.
What I understand :
In the ir_config_parameter, if the field is a Boolean, the set_param function will create or write my new param only if value is True : so if value is False, the parameter will be unlink (or not created) and he will disapear from the system parameters list.
The get_param function return the value she find in ir.config_param OR the default value.
So if the value is set to True as default the param is created with True value and checkbox is filled.
If I set the value to False, the param is unlinked but the checkbox is still fill because it will return the default value, which is True.
So in this case, my front only display filled chekbox whatever the value of my Boolean in database.
Is it normal behavior or I miss something ?