[IMP] email_template, marketing_campaign: ugly workaround for making sure we don't have trouble when the database layer returns unicode strings
bzr revid: odo@openerp.com-20100819183105-cpopyej4p23xnyhv
This commit is contained in:
parent
d6c822190f
commit
f2c6218697
|
@ -211,7 +211,7 @@ class email_template_account(osv.osv):
|
|||
raise error
|
||||
try:
|
||||
if serv.has_extn('AUTH') or this_object.smtpuname or this_object.smtppass:
|
||||
serv.login(this_object.smtpuname, this_object.smtppass)
|
||||
serv.login(str(this_object.smtpuname), str(this_object.smtppass))
|
||||
except Exception, error:
|
||||
raise error
|
||||
return serv
|
||||
|
|
|
@ -461,7 +461,7 @@ class marketing_campaign_transition(osv.osv):
|
|||
transition = self.browse(cr, uid, ids[0], context)
|
||||
if transition.trigger != 'time':
|
||||
raise ValueError('Delta is only relevant for timed transiton')
|
||||
return relativedelta(**{transition.interval_type: transition.interval_nbr})
|
||||
return relativedelta(**{str(transition.interval_type): transition.interval_nbr})
|
||||
|
||||
|
||||
_columns = {
|
||||
|
|
Loading…
Reference in New Issue