From 06fb14130a4bb88399c38979d1d07f37fbacf658 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Sat, 2 Jul 2011 01:41:24 +0200 Subject: [IMP] removed method=True params from all fields.function Server revision 3495 odo@openerp.com-20110701232328-flgxulxva70vnyxr removed the need for passing method=True to function fields, so this is the equivalent addons fix, removing it everywhere. Please be careful from now on, and do not pass it anymore! bzr revid: odo@openerp.com-20110701234124-a61zl0idvdfz3hyb --- addons/document/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/document/document.py') diff --git a/addons/document/document.py b/addons/document/document.py index 90f57438ce8..69e123b87eb 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -117,7 +117,7 @@ class document_file(osv.osv): # 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'), - 'datas': fields.function(_data_get, method=True, fnct_inv=_data_set, string='File Content', type="binary", nodrop=True), + 'datas': fields.function(_data_get, fnct_inv=_data_set, string='File Content', type="binary", nodrop=True), # Fields of document: 'user_id': fields.many2one('res.users', 'Owner', select=1), -- cgit v1.2.3 From 28986d87fbd14f2b7eb5f560a668f738322cf74d Mon Sep 17 00:00:00 2001 From: "Amit Parmar (OpenERP)" Date: Mon, 12 Sep 2011 18:21:06 +0530 Subject: [IMP] improve the opportunity merging and its attachments bzr revid: aar@tinyerp.com-20110912125106-xmh53poxaytd4frt --- addons/document/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/document/document.py') diff --git a/addons/document/document.py b/addons/document/document.py index 69e123b87eb..ef9ca01bd1e 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -252,7 +252,7 @@ class document_file(osv.osv): ids = ids2 if 'file_size' in vals: # only write that field using direct SQL calls del vals['file_size'] - if len(ids) and len(vals): + if ids and vals: result = super(document_file,self).write(cr, uid, ids, vals, context=context) cr.commit() # ? return result -- cgit v1.2.3