[IMP] models: do not create a column for a binary field stored in attachments

This commit is contained in:
Raphael Collet
2015-09-28 15:19:47 +02:00
parent 284d2914f1
commit 3f374d54f8
+1 -1
View File
@@ -2618,7 +2618,7 @@ class BaseModel(object):
# The field doesn't exist in database. Create it if necessary.
else:
if not isinstance(f, fields.function) or f.store:
if f._classic_write:
# add the missing field
cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, k, get_pg_type(f)[1]))
cr.execute("COMMENT ON COLUMN %s.\"%s\" IS %%s" % (self._table, k), (f.string,))