Skip to content
Snippets Groups Projects
Commit 5180abfb authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] email_template: remove `print` statements

bzr revid: chs@openerp.com-20100806094449-ua70o817fvtcfybs
parent 52afa5e3
Branches
Tags
No related merge requests found
......@@ -606,14 +606,12 @@ class email_template(osv.osv):
mailbox_values['body_text'] += sign
if mailbox_values['body_html']:
mailbox_values['body_html'] += sign
print 'Creating', mailbox_values
mailbox_id = self.pool.get('email_template.mailbox').create(
cursor,
user,
mailbox_values,
context)
print 'Sending', mailbox_id
return mailbox_id
......@@ -628,7 +626,6 @@ class email_template(osv.osv):
template = self.browse(cursor, user, template_id, context=context)
if not template:
raise Exception("The requested template could not be loaded")
print 'loaded', record_ids
result = True
for record_id in record_ids:
mailbox_id = self._generate_mailbox_item_from_template(
......@@ -637,7 +634,6 @@ class email_template(osv.osv):
template,
record_id,
context)
print 'loaded'
mail = self.pool.get('email_template.mailbox').browse(
cursor,
user,
......
......@@ -347,7 +347,6 @@ class email_template_account(osv.osv):
logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:MIME Error\nDescription: %s") % (id, error))
return {'error_msg': "Server Send Error\nDescription: %s"%error}
try:
#print msg['From'],toadds
serv.sendmail(msg['From'], addresses_l['all'], msg.as_string())
except Exception, error:
logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:Server Send Error\nDescription: %s") % (id, error))
......@@ -367,7 +366,6 @@ class email_template_account(osv.osv):
logger = netsvc.Logger()
#The standard email dates are of format similar to:
#Thu, 8 Oct 2009 09:35:42 +0200
#print time_as_string
date_as_date = False
convertor = {'+':1, '-':-1}
try:
......@@ -406,7 +404,6 @@ class email_template_account(osv.osv):
offset = datetime.timedelta(hours=0)
dt = dt + offset
date_as_date = dt.strftime('%Y-%m-%d %H:%M:%S')
#print date_as_date
except Exception, e:
logger.notifyChannel(
_("Email Template"),
......
......@@ -31,11 +31,8 @@ class email_template_engines(osv.osv):
_name = "email_template.engines"
_description = "Email Template Engine"
# def __init__(self):
# print "Started Engine"
def check(self):
print "Start self check"
pass
def strip_html(self,text):
#Removes HTML, Have to check if still relevent
......@@ -71,7 +68,6 @@ class email_template_engines(osv.osv):
#message: the complete text including placeholders
#templateid: the template id of the template
#context: TODO
#print cr,uid,id,message,templateid,context
if message:
logger = netsvc.Logger()
def merge(match):
......@@ -79,14 +75,11 @@ class email_template_engines(osv.osv):
obj_pool = self.pool.get(template.object_name.model)
obj = obj_pool.browse(cr, uid, id, context)
exp = str(match.group()[2:-2]).strip()
#print "level 1:",exp
exp_spl = exp.split('/')
#print "level 2:",exp_spl
try:
result = eval(exp_spl[0], {'object':obj,})
except:
result = "Rendering Error"
#print "result:",result
try:
if result in (None, False):
if len(exp_spl)>1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment