Initial commit
This commit is contained in:
18
lib/__init__.py
Normal file
18
lib/__init__.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user