[FIX] ORM.read() : property of type binary should not crash due to quotes

bzr revid: jvo@tinyerp.com-20100714192056-q1ygezb8c7gna2dh
This commit is contained in:
Jay (Open ERP) 2010-07-15 00:50:56 +05:30
parent a0f914b4d3
commit 51ebb43210
1 changed files with 1 additions and 1 deletions

View File

@ -2862,7 +2862,7 @@ class orm(orm_template):
return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,)
return "now()::timestamp AS %s" % (f,)
if isinstance(self._columns[f], fields.binary) and context.get('bin_size', False):
return 'length("%s") as "%s"' % (f_qual, f)
return 'length(%s) as "%s"' % (f_qual, f)
return f_qual
fields_pre2 = map(convert_field, fields_pre)