diff --git a/addons/document/document.py b/addons/document/document.py index 824607fa2e8..375f24cd62a 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -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