from . import ldap CONFIG_PARAMETER_PREFIX = 'ldap_partner_sync_settings' def param_name(param): """Just concatinates the name parts of an sync param """ return f'{CONFIG_PARAMETER_PREFIX}.{param}' def get_config(env, param, default=None): """Returns the param depending on env """ p = param_name(param) return env['ir.config_parameter'].sudo().get_param(p, default)