diff options
| author | Jay (Open ERP) <jvo@tinyerp.com> | 2010-03-15 12:57:07 +0530 |
|---|---|---|
| committer | Jay (Open ERP) <jvo@tinyerp.com> | 2010-03-15 12:57:07 +0530 |
| commit | 43f356ec67f042ef97ac70e332913fd82a472276 (patch) | |
| tree | b35dd5011e07bf6cc851557207abb7ca7ee4074e /addons/document/document.py | |
| parent | 9114ef2732f2b40b5beddb5d49860d4e2c19f302 (diff) | |
[IMP] Document : size for file_type column correceted
lp bug: https://launchpad.net/bugs/538224 fixed
bzr revid: jvo@tinyerp.com-20100315072707-1ajhzihk5u5z7wf0
Diffstat (limited to 'addons/document/document.py')
| -rw-r--r-- | addons/document/document.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
