[FIX] DB will save False Valuesfor booleans

bzr revid: jvo@tinyerp.com-20090513091303-tyoe0u8bx6v8mgtt
This commit is contained in:
Jay (Open ERP)
2009-05-13 14:43:03 +05:30
parent 68a11758fa
commit 5766b3cd04
+9 -1
View File
@@ -2405,7 +2405,15 @@ class orm(orm_template):
upd0 += ','+self._inherits[table]
upd1 += ',%s'
upd2.append(id)
#Start : Set bool fields to be False if they are not touched(to make search more powerful)
bool_fields = [x for x in self._columns.keys() if self._columns[x]._type=='boolean']
for bool_field in bool_fields:
if bool_field not in vals:
vals[bool_field] = False
#End
for field in vals:
if self._columns[field]._classic_write:
upd0 = upd0 + ',"' + field + '"'