Misc. changes

bzr revid: jvo@tinyerp.com-20090120135409-4ain027j7gxcfig3
This commit is contained in:
Jay (Open ERP) 2009-01-20 19:24:09 +05:30
parent 12174cedb5
commit 411f8d3d24
3 changed files with 5 additions and 5 deletions

View File

@ -179,7 +179,7 @@ class assertion_report(object):
def record_assertion(self, success, severity): def record_assertion(self, success, severity):
""" """
Records the result of an assertion for the failed/success count Records the result of an assertion for the failed/success count
retrurns success returns success
""" """
if severity in self._report: if severity in self._report:
self._report[severity][success] += 1 self._report[severity][success] += 1
@ -836,7 +836,7 @@ def convert_csv_import(cr, module, fname, csvcontent, idref=None, mode='init',
datas.append(map(lambda x: misc.ustr(x), line)) datas.append(map(lambda x: misc.ustr(x), line))
except: except:
logger = netsvc.Logger() logger = netsvc.Logger()
logger.notifyChannel("init", netsvc.LOG_ERROR, "Can not import the line: %s" % line) logger.notifyChannel("init", netsvc.LOG_ERROR, "Cannot import the line: %s" % line)
pool.get(model).import_data(cr, uid, fields, datas,mode, module,noupdate,filename=fname_partial) pool.get(model).import_data(cr, uid, fields, datas,mode, module,noupdate,filename=fname_partial)
if config.get('import_partial'): if config.get('import_partial'):
data = pickle.load(file(config.get('import_partial'))) data = pickle.load(file(config.get('import_partial')))
@ -858,7 +858,7 @@ def convert_xml_import(cr, module, xmlfile, idref=None, mode='init', noupdate=Fa
relaxng.assert_(doc) relaxng.assert_(doc)
except Exception, e: except Exception, e:
logger = netsvc.Logger() logger = netsvc.Logger()
logger.notifyChannel('init', netsvc.LOG_ERROR, 'The XML file do not fit the required schema !') logger.notifyChannel('init', netsvc.LOG_ERROR, 'The XML file does not fit the required schema !')
logger.notifyChannel('init', netsvc.LOG_ERROR, relaxng.error_log.last_error) logger.notifyChannel('init', netsvc.LOG_ERROR, relaxng.error_log.last_error)
raise raise

View File

@ -299,7 +299,7 @@ def reverse_enumerate(l):
#---------------------------------------------------------- #----------------------------------------------------------
# Emails # Emails
#---------------------------------------------------------- #----------------------------------------------------------
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False, attach=None, tinycrm=False, ssl=False, debug=False,subtype='plain'): def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False, attach=None, tinycrm=False, ssl=False, debug=False, subtype='plain'):
"""Send an email.""" """Send an email."""
import smtplib import smtplib
from email.MIMEText import MIMEText from email.MIMEText import MIMEText

View File

@ -148,7 +148,7 @@ class TinyPoFile(object):
def write_infos(self, modules): def write_infos(self, modules):
import release import release
self.buffer.write("# Translation of %(project)s.\n" \ self.buffer.write("# Translation of %(project)s.\n" \
"# This file containt the translation of the following modules:\n" \ "# This file contains the translation of the following modules:\n" \
"%(modules)s" \ "%(modules)s" \
"#\n" \ "#\n" \
"msgid \"\"\n" \ "msgid \"\"\n" \