upgrade-config-parameter (U2017)#

ir.config_parameter get_param/set_param, removed in Odoo 20.0.

Applies to Odoo 20.0 and later.

What it does#

Reports get_param and set_param on ir.config_parameter.

Why is this bad?#

Odoo 20.0 replaced them by typed methods, without a deprecation period: get_str, get_int, get_float, get_bool and set_str, set_int, set_float, set_bool. The old call raises AttributeError.

Fix safety#

Unsafe: get_param(k) becomes get_str(k) (a missing key gives '' instead of False, both falsy), int(get_param(k, d)) becomes get_int(k, d) and float(...) get_float(...), and set_param becomes set_str (which stores str(value); False/None deletes the key).