bzr revid: fp@tinyerp.com-20081027104650-1c3tf9xsx0rmmoat
This commit is contained in:
Fabien Pinckaers 2008-10-27 11:46:50 +01:00
parent 2a21082477
commit 54f4c8f1cc
2 changed files with 5 additions and 2 deletions

View File

@ -1404,7 +1404,10 @@ class orm(orm_template):
for key,val in res.items():
if f._multi:
val = val[k]
cr.execute("UPDATE \"%s\" SET \"%s\"='%s' where id=%d"% (self._table, k, val, key))
if (val<>False) or (type(val)<>bool):
cr.execute("UPDATE \"%s\" SET \"%s\"='%s' where id=%d"% (self._table, k, val, key))
#else:
# cr.execute("UPDATE \"%s\" SET \"%s\"=NULL where id=%d"% (self._table, k, key))
# and add constraints if needed
if isinstance(f, fields.many2one):

View File

@ -396,7 +396,7 @@ def email_send_attach(email_from, email_to, subject, body, email_cc=None, email_
msg = MIMEMultipart()
if not ssl:
ssl = config['smtp_ssl']
ssl = config.get('smtp_ssl', False)
msg['Subject'] = Header(subject.decode('utf8'), 'utf-8')
msg['From'] = email_from