From 43f356ec67f042ef97ac70e332913fd82a472276 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Mon, 15 Mar 2010 12:57:07 +0530 Subject: [PATCH] [IMP] Document : size for file_type column correceted lp bug: https://launchpad.net/bugs/538224 fixed bzr revid: jvo@tinyerp.com-20100315072707-1ajhzihk5u5z7wf0 --- addons/document/document.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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