tfr (Openerp) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-get-hostname-tools-tfr into 
lp:openobject-server.

Requested reviews:
  Vo Minh Thu (OpenERP) (vmt-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-get-hostname-tools-tfr/+merge/67722

this merge proposal define a standard way to get the hostname in tools misc 
gethostname
using the key network.hostname in ir.config_parameter.

This key will be set by the web client during configuration according to AL
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-get-hostname-tools-tfr/+merge/67722
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-get-hostname-tools-tfr.
=== modified file 'openerp/addons/base/ir/ir_config_parameter.py'
--- openerp/addons/base/ir/ir_config_parameter.py	2010-11-23 09:57:38 +0000
+++ openerp/addons/base/ir/ir_config_parameter.py	2011-07-12 15:49:30 +0000
@@ -62,7 +62,7 @@
             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 @@
         """
         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

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to