[MERGE] ir_config_parameter: added optional default argument to get_param.

bzr revid: vmt@openerp.com-20110714074940-r86xcpjjjo61xv90
This commit is contained in:
Vo Minh Thu
2011-07-14 09:49:40 +02:00
@@ -62,7 +62,7 @@ class ir_config_parameter(osv.osv):
if not ids:
self.set_param(cr, 1, key, func())
def get_param(self, cr, uid, key, context=None):
def get_param(self, cr, uid, key, default=False, context=None):
""" Get the value of a parameter.
@param key: The key of the parameter.
@@ -72,7 +72,7 @@ class ir_config_parameter(osv.osv):
"""
ids = self.search(cr, uid, [('key','=',key)], context=context)
if not ids:
return False
return default
param = self.browse(cr, uid, ids[0], context=context)
value = param.value
return value