diff --git a/bin/osv/orm.py b/bin/osv/orm.py index f65c9183b20..37cc2e50abe 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -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): diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 509c04ec5e8..9e292c9e27a 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -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