[IMP] Document : size for file_type column correceted

lp bug: https://launchpad.net/bugs/538224 fixed

bzr revid: jvo@tinyerp.com-20100315072707-1ajhzihk5u5z7wf0
This commit is contained in:
Jay (Open ERP)
2010-03-15 12:57:07 +05:30
parent 9114ef2732
commit 43f356ec67
+3 -1
View File
@@ -77,7 +77,7 @@ class document_file(osv.osv):
# the directory id now is mandatory. It can still be computed automatically.
'parent_id': fields.many2one('document.directory', 'Directory', select=1, required=True),
'file_size': fields.integer('File Size', required=True),
'file_type': fields.char('Content Type', size=32),
'file_type': fields.char('Content Type', size=64),
# If ir.attachment contained any data before document is installed, preserve
# the data, don't drop the column!
'db_datas': fields.binary('Data', oldname='datas'),
@@ -141,6 +141,8 @@ class document_file(osv.osv):
return super(document_file, self).copy(cr, uid, id, default, context)
def write(self, cr, uid, ids, vals, context=None):
if not isinstance(ids, list):
ids = [ids]
res = self.search(cr, uid, [('id', 'in', ids)])
if not len(res):
return False