← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-server/trunk-xrg-fixes6 into lp:openobject-server

 

xrg has proposed merging lp:~openerp-dev/openobject-server/trunk-xrg-fixes6 into lp:openobject-server.

Requested reviews:
  OpenERP Core Team (openerp)

-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-xrg-fixes6/+merge/38615
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-server/trunk-xrg-fixes6.
=== modified file 'bin/addons/__init__.py'
--- bin/addons/__init__.py	2010-10-11 10:24:39 +0000
+++ bin/addons/__init__.py	2010-10-16 07:13:45 +0000
@@ -856,7 +856,7 @@
             cr.execute("""select model,name from ir_model where id NOT IN (select distinct model_id from ir_model_access)""")
             for (model, name) in cr.fetchall():
                 model_obj = pool.get(model)
-                if not isinstance(model_obj, osv.osv.osv_memory):
+                if model_obj and not isinstance(model_obj, osv.osv.osv_memory):
                     logger.notifyChannel('init', netsvc.LOG_WARNING, 'object %s (%s) has no access rules!' % (model, name))
 
             # Temporary warning while we remove access rights on osv_memory objects, as they have
@@ -872,6 +872,8 @@
                 obj = pool.get(model)
                 if obj:
                     obj._check_removed_columns(cr, log=True)
+                else:
+                    logger.warning("Model %s is referenced but not present in the orm pool!", model)
 
         if report.get_report():
             logger.notifyChannel('init', netsvc.LOG_INFO, report)

=== modified file 'bin/addons/base/module/module.py'
--- bin/addons/base/module/module.py	2010-10-08 13:20:28 +0000
+++ bin/addons/base/module/module.py	2010-10-16 07:13:45 +0000
@@ -29,8 +29,11 @@
 import addons
 import netsvc
 import pooler
+<<<<<<< TREE
 import release
 import tools
+=======
+>>>>>>> MERGE-SOURCE
 
 from tools.parse_version import parse_version
 from tools.translate import _
@@ -436,7 +439,7 @@
         self.write(cr, uid, [id], {'category_id': p_id})
 
     def update_translations(self, cr, uid, ids, filter_lang=None):
-        logger = netsvc.Logger()
+        logger = logging.getLogger('i18n')
         if not filter_lang:
             pool = pooler.get_pool(cr.dbname)
             lang_obj = pool.get('res.lang')
@@ -456,13 +459,18 @@
                 if len(lang) > 5:
                     raise osv.except_osv(_('Error'), _('You Can Not Load Translation For language Due To Invalid Language/Country Code'))
                 iso_lang = tools.get_iso_codes(lang)
-                f = os.path.join(modpath, 'i18n', iso_lang + '.po')
-                if not os.path.exists(f) and iso_lang.find('_') != -1:
-                    f = os.path.join(modpath, 'i18n', iso_lang.split('_')[0] + '.po')
+                f = addons.get_module_resource(mod.name, 'i18n', iso_lang + '.po')
+                # Implementation notice: we must first search for the full name of
+                # the language derivative, like "en_UK", and then the generic,
+                # like "en".
+                if (not os.path.exists(f)) and '_' in iso_lang:
+                    f = addons.get_module_resource(mod.name, 'i18n', iso_lang.split('_')[0] + '.po')
                     iso_lang = iso_lang.split('_')[0]
                 if os.path.exists(f):
-                    logger.notifyChannel("i18n", netsvc.LOG_INFO, 'module %s: loading translation file for language %s' % (mod.name, iso_lang))
+                    logger.info('module %s: loading translation file for language %s', mod.name, iso_lang)
                     tools.trans_load(cr.dbname, f, lang, verbose=False)
+                else:
+                    logger.warning('module %s: no translation for language %s', mod.name, iso_lang)
 
     def check(self, cr, uid, ids, context=None):
         logger = logging.getLogger('init')

=== modified file 'bin/addons/base/res/res_user.py'
--- bin/addons/base/res/res_user.py	2010-10-13 21:53:40 +0000
+++ bin/addons/base/res/res_user.py	2010-10-16 07:13:45 +0000
@@ -502,9 +502,24 @@
     }
 
     def unlink(self, cr, uid, ids, context=None):
+        group_users = []
         for record in self.read(cr, uid, ids, ['users'], context=context):
             if record['users']:
+                group_users.extend(record['users'])
+        
+        if group_users:
+            group_names = []
+            try:
+                for rec in self.pool.get('res.users').read(cr, uid, group_users, ['name'], context=context):
+                    group_names.append(rec['name'])
+                if len(group_names) >=5:
+                    group_names = group_names[:5]
+                    group_names += '...'
+            except Exception:
                 raise osv.except_osv(_('Warning !'), _('Make sure you have no users linked with the group(s)!'))
+            raise osv.except_osv(_('Warning !'), 
+                        _('Group(s) cannot be deleted, because user(s) %s participate in them!') % \
+                            ', '.join(group_names))
         return super(groups2, self).unlink(cr, uid, ids, context=context)
 
 groups2()

=== modified file 'bin/osv/orm.py'
--- bin/osv/orm.py	2010-10-15 20:06:55 +0000
+++ bin/osv/orm.py	2010-10-16 07:13:45 +0000
@@ -1283,7 +1283,7 @@
                     'fields': xfields
                 }
                 attrs = {'views': views}
-                view = False
+                # view = False
                 fields = views.get('field', False) and views['field'].get('fields', False)
             if node.get('name'):
                 attrs = {}
@@ -2205,7 +2205,7 @@
 
         fget = self.fields_get(cr, uid, fields)
         float_int_fields = filter(lambda x: fget[x]['type'] in ('float', 'integer'), fields)
-        sum = {}
+        # sum = {}
         flist = ''
         group_by = groupby
         if groupby:
@@ -2226,10 +2226,10 @@
                 or (f in self._columns and getattr(self._columns[f], '_classic_write'))]
         for f in fields_pre:
             if f not in ['id', 'sequence']:
-                operator = fget[f].get('group_operator', 'sum')
+                oper = fget[f].get('group_operator', 'sum')
                 if flist:
                     flist += ','
-                flist += operator+'('+f+') as '+f
+                flist += oper+'('+f+') as '+f
 
         gb = groupby and (' GROUP BY '+groupby) or ''
 
@@ -2556,7 +2556,7 @@
                                 if not ok:
                                     i = 0
                                     while True:
-                                        newname = self._table + '_moved' + str(i)
+                                        newname = k + '_moved' + str(i)
                                         cr.execute("SELECT count(1) FROM pg_class c,pg_attribute a " \
                                             "WHERE c.relname=%s " \
                                             "AND a.attname=%s " \
@@ -3041,6 +3041,7 @@
         else:
             res = map(lambda x: {'id': x}, ids)
 
+<<<<<<< TREE
 #        if not res:
 #            res = map(lambda x: {'id': x}, ids)
 #            for record in res:
@@ -3056,6 +3057,8 @@
 #                        field_val = []
 #                    record.update({f:field_val})
 
+=======
+>>>>>>> MERGE-SOURCE
         for f in fields_pre:
             if f == self.CONCURRENCY_CHECK_FIELD:
                 continue
@@ -3192,11 +3195,21 @@
         for r in res:
             for key in r:
                 r[key] = r[key] or False
+<<<<<<< TREE
                 if details and key in ('write_uid', 'create_uid'):
                     if r[key]:
+=======
+                if key in ('write_uid', 'create_uid', 'uid') and details and r[key]:
+                    try:
+>>>>>>> MERGE-SOURCE
                         r[key] = self.pool.get('res.users').name_get(cr, user, [r[key]])[0]
+<<<<<<< TREE
             r['xmlid'] = ("%(module)s.%(name)s" % r) if r['name'] else False
             del r['name'], r['module']
+=======
+                    except Exception:
+                        pass # Leave the numeric uid there
+>>>>>>> MERGE-SOURCE
         if uniq:
             return res[ids[0]]
         return res
@@ -3339,7 +3352,6 @@
             + For a reference field, use a string with the model name, a comma, and the target object id (example: ``'product.product, 5'``)
 
         """
-        readonly = None
         for field in vals.copy():
             fobj = None
             if field in self._columns:

=== modified file 'bin/osv/osv.py'
--- bin/osv/osv.py	2010-09-16 11:39:06 +0000
+++ bin/osv/osv.py	2010-10-16 07:13:45 +0000
@@ -27,8 +27,8 @@
 import netsvc
 import pooler
 import copy
-import sys
-import traceback
+# import sys
+# import traceback
 import logging
 from psycopg2 import IntegrityError, errorcodes
 from tools.func import wraps
@@ -88,7 +88,7 @@
                     self.abortResponse(1, _('Integrity Error'), 'warning', msg)
                 else:
                     self.abortResponse(1, _('Integrity Error'), 'warning', inst[0])
-            except Exception, e:
+            except Exception:
                 self.logger.exception("Uncaught exception")
                 raise
 

=== removed file 'bin/server.cert'
--- bin/server.cert	2006-12-07 13:41:40 +0000
+++ bin/server.cert	1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICNDCCAZ0CAQEwDQYJKoZIhvcNAQEEBQAweTEQMA4GA1UEChMHVGlueUVSUDEM
-MAoGA1UECxMDRVJQMRkwFwYJKoZIhvcNAQkBFgpmcEB0aW55LmJlMRAwDgYDVQQH
-EwdXYWxoYWluMQswCQYDVQQIEwJCVzELMAkGA1UEBhMCQkUxEDAOBgNVBAMTB1Rp
-bnlFUlAwHhcNMDYwNTI0MDgzODUxWhcNMDcwNTI0MDgzODUxWjBMMQswCQYDVQQG
-EwJCRTELMAkGA1UECBMCQlcxEDAOBgNVBAoTB1RpbnlFUlAxDDAKBgNVBAsTA0VS
-UDEQMA4GA1UEAxMHVGlueUVSUDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-xzIDlU2PrczPsgXtxCskYxuwMPgNCNSCBfWsUZ9nJzlZfRAEXEq4LxaTPIgkzkIF
-82bmJLgFz6/CyCFid4mkBLQBj30Opp2Vco39WRncNKHKxbk+/wZpZtQ0bSpvf+F4
-MBqCLldYIqsoyenombVCb8X62IUu0ENF1wR22owvyKcCAwEAATANBgkqhkiG9w0B
-AQQFAAOBgQB2yUqJ3gbQ8I6rcmaVJlcLDHfC5w1Jr1cUzcJevOPh3wygSZYYoUoe
-yeYlzEag/DpPSHyRiJJVOKdiwU0yfmZPhfDNtDiBr47bz8qzIsYq5VeMmSeXrq/f
-AA3iI4xE8YFzJHWtiBCqqyUok+j9pVad7iV7+UVIePHZLEkGGWIjDA==
------END CERTIFICATE-----

=== removed file 'bin/server.pkey'
--- bin/server.pkey	2006-12-07 13:41:40 +0000
+++ bin/server.pkey	1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDHMgOVTY+tzM+yBe3EKyRjG7Aw+A0I1IIF9axRn2cnOVl9EARc
-SrgvFpM8iCTOQgXzZuYkuAXPr8LIIWJ3iaQEtAGPfQ6mnZVyjf1ZGdw0ocrFuT7/
-Bmlm1DRtKm9/4XgwGoIuV1giqyjJ6eiZtUJvxfrYhS7QQ0XXBHbajC/IpwIDAQAB
-AoGAVwAxMHS/3FkoHckZICT3r5HYUosEpmaqo4+5w6yrkSYrP8RPI0A/UdG6XSXZ
-bXzIvJakzkTRxPQvTtnF+A/V4rF9hxwB8cGXSywv5eDGmZ91qIsxY7Sv99VqSKNH
-dNr9aZHloTvI51e/oramIJ/O3A+TbAS5i+u1DJC2IIFJcAECQQD8iRPTlPIqzjYD
-Lg7KYGvwW9TE4ONAhC86kJbzV5o3amlV5duJgnkl/mNlfN1ihA7f3Gx9dfCjfRKp
-V1rcjtCBAkEAye2aMw2v1m+MEqcPxyTUzVf5Y8BIXWbk15T43czXec9YclZSOBCX
-Dgv4a3Fk+yxQUE0cZUH0U4FJq6mTgpuFJwJASFqZ9KATNlJ4xTZ4BGHV6zrUXkg0
-tDJrObNdnID37XKulW7TFLXuMgWNwvEgmO5POLJ13whglubp5tzhapn8gQJAJz9Z
-U0b7wFAaB54VAP31ppvMy0iaSB0xqX05CdNAplpYtJB2lpMS6RYGiMuXdwJb8d+q
-/ztcg8aDTSw+kYoszQJBAPBrt694VkGT1k9Be6e5wyVDrE05bkHhFxPk/HMeWMDX
-sZqHPs9vVaLBqu/uU84FdwRMOV71RG90g6eUEl7HWsg=
------END RSA PRIVATE KEY-----

=== modified file 'bin/service/websrv_lib.py'
--- bin/service/websrv_lib.py	2010-08-09 18:08:32 +0000
+++ bin/service/websrv_lib.py	2010-10-16 07:13:45 +0000
@@ -136,15 +136,25 @@
             return self.path
         return False
 
-class noconnection:
+class noconnection(object):
     """ a class to use instead of the real connection
     """
+    def __init__(self, realsocket=None):
+        self.__hidden_socket = realsocket
+
     def makefile(self, mode, bufsize):
         return None
 
     def close(self):
         pass
 
+    def getsockname(self):
+        """ We need to return info about the real socket that is used for the request
+        """
+        if not self.__hidden_socket:
+            raise AttributeError("No-connection class cannot tell real socket")
+        return self.__hidden_socket.getsockname()
+
 class dummyconn:
     def shutdown(self, tru):
         pass
@@ -390,7 +400,7 @@
                 npath = '/' + npath
 
             if not self.in_handlers.has_key(p):
-                self.in_handlers[p] = vdir.handler(noconnection(),self.client_address,self.server)
+                self.in_handlers[p] = vdir.handler(noconnection(self.request),self.client_address,self.server)
                 if vdir.auth_provider:
                     vdir.auth_provider.setupAuth(self, self.in_handlers[p])
             hnd = self.in_handlers[p]

=== modified file 'bin/sql_db.py'
--- bin/sql_db.py	2010-09-18 09:30:52 +0000
+++ bin/sql_db.py	2010-10-16 07:13:45 +0000
@@ -28,6 +28,7 @@
 from psycopg2.pool import PoolError
 
 import psycopg2.extensions
+import warnings
 
 psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
 
@@ -51,11 +52,11 @@
 
 
 import tools
-from tools.func import wraps
+from tools.func import wraps, frame_codeinfo
 from datetime import datetime as mdt
 from datetime import timedelta
 import threading
-from inspect import stack
+from inspect import currentframe
 
 import re
 re_from = re.compile('.* from "?([a-zA-Z_0-9]+)"? .*$');
@@ -71,7 +72,7 @@
         @wraps(f)
         def wrapper(self, *args, **kwargs):
             if self.__closed:
-                raise psycopg2.ProgrammingError('Unable to use the cursor after having closed it')
+                raise psycopg2.OperationalError('Unable to use the cursor after having closed it')
             return f(self, *args, **kwargs)
         return wrapper
 
@@ -93,7 +94,7 @@
         self._obj = self._cnx.cursor(cursor_factory=psycopg1cursor)
         self.__closed = False   # real initialisation value
         self.autocommit(False)
-        self.__caller = tuple(stack()[2][1:3])
+        self.__caller = frame_codeinfo(currentframe(),2)
 
     def __del__(self):
         if not self.__closed:
@@ -337,10 +338,12 @@
     def __nonzero__(self):
         """Check if connection is possible"""
         try:
+            warnings.warn("You use an expensive function to test a connection.",
+                      DeprecationWarning, stacklevel=1)
             cr = self.cursor()
             cr.close()
             return True
-        except:
+        except Exception:
             return False
 
 

=== removed directory 'bin/ssl'
=== removed file 'bin/ssl/cert.cfg'
--- bin/ssl/cert.cfg	2008-11-17 09:23:39 +0000
+++ bin/ssl/cert.cfg	1970-01-01 00:00:00 +0000
@@ -1,89 +0,0 @@
-# X.509 Certificate options
-#
-# DN options
-
-# The organization of the subject.
-organization = "Acme inc."
-
-# The organizational unit of the subject.
-unit = "dept."
-
-# The locality of the subject.
-# locality =
-
-# The state of the certificate owner.
-state = "Attiki"
-
-# The country of the subject. Two letter code.
-country = GR
-
-# The common name of the certificate owner.
-cn = "Some company"
-
-# A user id of the certificate owner.
-#uid = "clauper"
-
-# If the supported DN OIDs are not adequate you can set
-# any OID here.
-# For example set the X.520 Title and the X.520 Pseudonym
-# by using OID and string pairs.
-#dn_oid = "2.5.4.12" "Dr." "2.5.4.65" "jackal"
-
-# This is deprecated and should not be used in new
-# certificates.
-# pkcs9_email = "none@xxxxxxxx"
-
-# The serial number of the certificate
-serial = 001
-
-# In how many days, counting from today, this certificate will expire.
-expiration_days = 700
-
-# X.509 v3 extensions
-
-# A dnsname in case of a WWW server.
-#dns_name = "www.none.org"
-#dns_name = "www.morethanone.org"
-
-# An IP address in case of a server.
-#ip_address = "192.168.1.1"
-
-# An email in case of a person
-email = "none@xxxxxxxx"
-
-# An URL that has CRLs (certificate revocation lists)
-# available. Needed in CA certificates.
-#crl_dist_points = "http://www.getcrl.crl/getcrl/";
-
-# Whether this is a CA certificate or not
-#ca
-
-# Whether this certificate will be used for a TLS client
-#tls_www_client
-
-# Whether this certificate will be used for a TLS server
-tls_www_server
-
-# Whether this certificate will be used to sign data (needed
-# in TLS DHE ciphersuites).
-#signing_key
-
-# Whether this certificate will be used to encrypt data (needed
-# in TLS RSA ciphersuites). Note that it is prefered to use different
-# keys for encryption and signing.
-encryption_key
-
-# Whether this key will be used to sign other certificates.
-#cert_signing_key
-
-# Whether this key will be used to sign CRLs.
-#crl_signing_key
-
-# Whether this key will be used to sign code.
-#code_signing_key
-
-# Whether this key will be used to sign OCSP data.
-#ocsp_signing_key
-
-# Whether this key will be used for time stamping.
-#time_stamping_key

=== modified file 'bin/tools/convert.py'
--- bin/tools/convert.py	2010-10-15 14:07:29 +0000
+++ bin/tools/convert.py	2010-10-16 07:13:45 +0000
@@ -31,11 +31,11 @@
 import release
 try:
     import pytz
-except:
+except ImportError:
     logging.getLogger("init").warning('could not find pytz library, please install it')
     class pytzclass(object):
         all_timezones=[]
-    pytz=pytzclass()
+    pytz = pytzclass()
 
 
 from datetime import datetime, timedelta

=== modified file 'bin/tools/func.py'
--- bin/tools/func.py	2009-10-20 10:52:23 +0000
+++ bin/tools/func.py	2010-10-16 07:13:45 +0000
@@ -76,3 +76,24 @@
         return partial(update_wrapper, wrapped=wrapped,
                        assigned=assigned, updated=updated)
 
+
+from inspect import getsourcefile
+
+def frame_codeinfo(fframe, back=0):
+    """ Return a (filename, line) pair for a previous frame .
+        @return (filename, lineno) where lineno is either int or string==''
+    """
+    
+    try:
+        if not fframe:
+            return ("<unknown>", '')
+        for i in range(back):
+            fframe = fframe.f_back
+        try:
+            fname = getsourcefile(fframe)
+        except TypeError:
+            fname = '<builtin>'
+        lineno = fframe.f_lineno or ''
+        return (fname, lineno)
+    except Exception:
+        return ("<unknown>", '')

=== modified file 'bin/tools/translate.py'
--- bin/tools/translate.py	2010-10-12 18:20:42 +0000
+++ bin/tools/translate.py	2010-10-16 07:13:45 +0000
@@ -27,6 +27,7 @@
 import locale
 import os
 import re
+import logging
 import tarfile
 import tempfile
 from os.path import join
@@ -183,11 +184,11 @@
 # class to handle po files
 class TinyPoFile(object):
     def __init__(self, buffer):
-        self.logger = netsvc.Logger()
+        self.logger = logging.getLogger('i18n')
         self.buffer = buffer
 
     def warn(self, msg):
-        self.logger.notifyChannel("i18n", netsvc.LOG_WARNING, msg)
+        self.logger.warning(msg)
 
     def __iter__(self):
         self.buffer.seek(0)
@@ -284,7 +285,9 @@
         self.first = False
 
         if name is None:
-            self.warn('Missing "#:" formated comment for the following source:\n\t%s' % (source,))
+            if not fuzzy:
+                self.warn('Missing "#:" formated comment at line %d for the following source:\n\t%s', 
+                        self.cur_line(), source[:30])
             return self.next()
         return type, name, res_id, source, trad
 
@@ -456,7 +459,7 @@
     return module in modules
 
 def trans_generate(lang, modules, dbname=None):
-    logger = netsvc.Logger()
+    logger = logging.getLogger('i18n')
     if not dbname:
         dbname=tools.config['db_name']
         if not modules:
@@ -499,12 +502,12 @@
         xml_name = "%s.%s" % (module, encode(xml_name))
 
         if not pool.get(model):
-            logger.notifyChannel("db", netsvc.LOG_ERROR, "Unable to find object %r" % (model,))
+            logger.error("Unable to find object %r", model)
             continue
 
         exists = pool.get(model).exists(cr, uid, res_id)
         if not exists:
-            logger.notifyChannel("db", netsvc.LOG_WARNING, "Unable to find object %r with id %d" % (model, res_id))
+            logger.warning("Unable to find object %r with id %d", model, res_id)
             continue
         obj = pool.get(model).browse(cr, uid, res_id)
 
@@ -531,7 +534,7 @@
 
                         # export fields
                         if not result.has_key('fields'):
-                            logger.notifyChannel("db",netsvc.LOG_WARNING,"res has no fields: %r" % result)
+                            logger.warning("res has no fields: %r", result)
                             continue
                         for field_name, field_def in result['fields'].iteritems():
                             res_name = name + ',' + field_name
@@ -560,7 +563,7 @@
             try:
                 field_name = encode(obj.name)
             except AttributeError, exc:
-                logger.notifyChannel("db", netsvc.LOG_ERROR, "name error in %s: %s" % (xml_name,str(exc)))
+                logger.error("name error in %s: %s", xml_name, str(exc))
                 continue
             objmodel = pool.get(obj.model)
             if not objmodel or not field_name in objmodel._columns:
@@ -602,6 +605,7 @@
                 fname = obj.report_xsl
                 parse_func = trans_parse_xsl
                 report_type = "xsl"
+<<<<<<< TREE
             if fname and obj.report_type in ('pdf', 'xsl'):
                 try:
                     d = etree.parse(tools.file_open(fname))
@@ -609,6 +613,16 @@
                         push_translation(module, report_type, name, 0, t)
                 except (IOError, etree.XMLSyntaxError):
                     logging.getLogger("i18n").exception("couldn't export translation for report %s %s %s", name, report_type, fname)
+=======
+            try:
+                xmlstr = tools.file_open(fname).read()
+                d = etree.XML(xmlstr)
+                for t in parse_func(d):
+                    push_translation(module, report_type, name, 0, t)
+            except IOError, etree.XMLSyntaxError:
+                if fname:
+                    logger.error("couldn't export translation for report %s %s %s", name, report_type, fname)
+>>>>>>> MERGE-SOURCE
 
         for constraint in pool.get(model)._constraints:
             msg = constraint[1]
@@ -696,22 +710,23 @@
     return out
 
 def trans_load(db_name, filename, lang, strict=False, verbose=True):
-    logger = netsvc.Logger()
+    logger = logging.getLogger('i18n')
     try:
         fileobj = open(filename,'r')
+        logger.info("loading %s", filename)
         fileformat = os.path.splitext(filename)[-1][1:].lower()
         r = trans_load_data(db_name, fileobj, fileformat, lang, strict=strict, verbose=verbose)
         fileobj.close()
         return r
     except IOError:
         if verbose:
-            logger.notifyChannel("i18n", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,))
+            logger.error("couldn't read translation file %s", filename)
         return None
 
 def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name=None, verbose=True):
-    logger = netsvc.Logger()
+    logger = logging.getLogger('i18n')
     if verbose:
-        logger.notifyChannel("i18n", netsvc.LOG_INFO, 'loading translation file for language %s' % (lang))
+        logger.info('loading translation file for language %s', lang)
     pool = pooler.get_pool(db_name)
     lang_obj = pool.get('res.lang')
     trans_obj = pool.get('ir.translation')
@@ -735,7 +750,7 @@
             if fail:
                 lc = locale.getdefaultlocale()[0]
                 msg = 'Unable to get information for locale %s. Information from the default locale (%s) have been used.'
-                logger.notifyChannel('i18n', netsvc.LOG_WARNING, msg % (lang, lc))
+                logger.warning(msg, lang, lc)
 
             if not lang_name:
                 lang_name = tools.get_languages().get(lang, lang)
@@ -774,6 +789,7 @@
             reader = TinyPoFile(fileobj)
             f = ['type', 'name', 'res_id', 'src', 'value']
         else:
+            logger.error('Bad file format: %s', fileformat)
             raise Exception(_('Bad file format'))
 
         # read the rest of the file
@@ -850,11 +866,10 @@
             cr.commit()
         cr.close()
         if verbose:
-            logger.notifyChannel("i18n", netsvc.LOG_INFO,
-                    "translation file loaded succesfully")
+            logger.info("translation file loaded succesfully")
     except IOError:
         filename = '[lang: %s][format: %s]' % (iso_lang or 'new', fileformat)
-        logger.notifyChannel("i18n", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,))
+        logger.exception("couldn't read translation file %s", filename)
 
 def get_locales(lang=None):
     if lang is None:

=== removed file 'change-loglevel.sh'
--- change-loglevel.sh	2010-03-10 13:20:03 +0000
+++ change-loglevel.sh	1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-ADMIN_PASSWD='admin'
-method_1() {
-    cat '-' << EOF
-<xml>
-<methodCall>
-    <methodName>set_loglevel</methodName>
-    <params>
-        <param><value><string>$ADMIN_PASSWD</string></value>
-        </param>
-        <param>
-        <value><string>$1</string></value>
-        </param>
-    </params>
-</methodCall>
-EOF
-}
-LEVEL=10
-
-if [ -n "$1" ] ; then LEVEL=$1 ; fi
-
-method_1 $LEVEL | POST -c 'text/xml' http://localhost:8069/xmlrpc/common
-#eof

=== removed file 'get-srvstats.sh'
--- get-srvstats.sh	2010-03-10 13:20:03 +0000
+++ get-srvstats.sh	1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-# ADMIN_PASSWD='admin'
-method_1() {
-    cat '-' << EOF
-<xml>
-<methodCall>
-    <methodName>get_stats</methodName>
-    <params>
-    </params>
-</methodCall>
-EOF
-}
-LEVEL=10
-
-if [ -n "$1" ] ; then LEVEL=$1 ; fi
-
-method_1 $LEVEL | POST -c 'text/xml' http://localhost:8069/xmlrpc/common
-#eof

=== removed file 'list-services.sh'
--- list-services.sh	2010-07-26 09:33:34 +0000
+++ list-services.sh	1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-# ADMIN_PASSWD='admin'
-method_1() {
-    cat '-' << EOF
-<xml>
-<methodCall>
-    <methodName>list_http_services</methodName>
-    <params>
-    </params>
-</methodCall>
-EOF
-}
-
-method_1 | POST -c 'text/xml' http://localhost:8069/xmlrpc/common
-#eof

=== modified file 'setup.py'
--- setup.py	2010-09-20 13:28:45 +0000
+++ setup.py	2010-10-16 07:13:45 +0000
@@ -98,9 +98,7 @@
             files.append((root, [join(root, name) for name in names]))
         for root, _, names in os.walk('pixmaps'):
             files.append((root, [join(root, name) for name in names]))
-        files.append(('.', [join('bin', 'import_xml.rng'),
-                            join('bin', 'server.pkey'),
-                            join('bin', 'server.cert')]))
+        files.append(('.', [join('bin', 'import_xml.rng'),]))
     else:
         man_directory = join('share', 'man')
         files.append((join(man_directory, 'man1'), ['man/openerp-server.1']))
@@ -115,9 +113,7 @@
 
         openerp_site_packages = join(get_python_lib(prefix=''), 'openerp-server')
 
-        files.append((openerp_site_packages, [join('bin', 'import_xml.rng'),
-                                              join('bin', 'server.pkey'),
-                                              join('bin', 'server.cert')]))
+        files.append((openerp_site_packages, [join('bin', 'import_xml.rng'),]))
 
         if sys.version_info[0:2] == (2,5):
             files.append((openerp_site_packages, [ join('python25-compat','BaseHTTPServer.py'),

=== added file 'ssl-cert.cfg'
--- ssl-cert.cfg	1970-01-01 00:00:00 +0000
+++ ssl-cert.cfg	2010-10-16 07:13:45 +0000
@@ -0,0 +1,89 @@
+# X.509 Certificate options
+#
+# DN options
+
+# The organization of the subject.
+organization = "Some organization."
+
+# The organizational unit of the subject.
+unit = "ERP dept."
+
+# The locality of the subject.
+# locality =
+
+# The state of the certificate owner.
+state = "State"
+
+# The country of the subject. Two letter code.
+country = BE
+
+# The common name of the certificate owner.
+cn = "Some company"
+
+# A user id of the certificate owner.
+#uid = "clauper"
+
+# If the supported DN OIDs are not adequate you can set
+# any OID here.
+# For example set the X.520 Title and the X.520 Pseudonym
+# by using OID and string pairs.
+#dn_oid = "2.5.4.12" "Dr." "2.5.4.65" "jackal"
+
+# This is deprecated and should not be used in new
+# certificates.
+# pkcs9_email = "none@xxxxxxxx"
+
+# The serial number of the certificate
+serial = 001
+
+# In how many days, counting from today, this certificate will expire.
+expiration_days = 700
+
+# X.509 v3 extensions
+
+# A dnsname in case of a WWW server.
+#dns_name = "www.none.org"
+#dns_name = "www.morethanone.org"
+
+# An IP address in case of a server.
+#ip_address = "192.168.1.1"
+
+# An email in case of a person
+email = "none@xxxxxxxx"
+
+# An URL that has CRLs (certificate revocation lists)
+# available. Needed in CA certificates.
+#crl_dist_points = "http://www.getcrl.crl/getcrl/";
+
+# Whether this is a CA certificate or not
+#ca
+
+# Whether this certificate will be used for a TLS client
+#tls_www_client
+
+# Whether this certificate will be used for a TLS server
+tls_www_server
+
+# Whether this certificate will be used to sign data (needed
+# in TLS DHE ciphersuites).
+#signing_key
+
+# Whether this certificate will be used to encrypt data (needed
+# in TLS RSA ciphersuites). Note that it is prefered to use different
+# keys for encryption and signing.
+encryption_key
+
+# Whether this key will be used to sign other certificates.
+#cert_signing_key
+
+# Whether this key will be used to sign CRLs.
+#crl_signing_key
+
+# Whether this key will be used to sign code.
+#code_signing_key
+
+# Whether this key will be used to sign OCSP data.
+#ocsp_signing_key
+
+# Whether this key will be used for time stamping.
+#time_stamping_key

=== added file 'tools/change-loglevel.sh'
--- tools/change-loglevel.sh	1970-01-01 00:00:00 +0000
+++ tools/change-loglevel.sh	2010-10-16 07:13:45 +0000
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+ADMIN_PASSWD='admin'
+method_1() {
+    cat '-' << EOF
+<xml>
+<methodCall>
+    <methodName>set_loglevel</methodName>
+    <params>
+        <param><value><string>$ADMIN_PASSWD</string></value>
+        </param>
+        <param>
+        <value><string>$1</string></value>
+        </param>
+    </params>
+</methodCall>
+EOF
+}
+LEVEL=10
+
+if [ -n "$1" ] ; then LEVEL=$1 ; fi
+
+method_1 $LEVEL | POST -c 'text/xml' http://localhost:8069/xmlrpc/common
+#eof

=== added file 'tools/get-srvstats.sh'
--- tools/get-srvstats.sh	1970-01-01 00:00:00 +0000
+++ tools/get-srvstats.sh	2010-10-16 07:13:45 +0000
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# ADMIN_PASSWD='admin'
+method_1() {
+    cat '-' << EOF
+<xml>
+<methodCall>
+    <methodName>get_stats</methodName>
+    <params>
+    </params>
+</methodCall>
+EOF
+}
+LEVEL=10
+
+if [ -n "$1" ] ; then LEVEL=$1 ; fi
+
+method_1 $LEVEL | POST -c 'text/xml' http://localhost:8069/xmlrpc/common
+#eof

=== added file 'tools/list-services.sh'
--- tools/list-services.sh	1970-01-01 00:00:00 +0000
+++ tools/list-services.sh	2010-10-16 07:13:45 +0000
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# ADMIN_PASSWD='admin'
+method_1() {
+    cat '-' << EOF
+<xml>
+<methodCall>
+    <methodName>list_http_services</methodName>
+    <params>
+    </params>
+</methodCall>
+EOF
+}
+
+method_1 | POST -c 'text/xml' http://localhost:8069/xmlrpc/common
+#eof