From 9114ef2732f2b40b5beddb5d49860d4e2c19f302 Mon Sep 17 00:00:00 2001 From: "YSA(OpenERP)" <> Date: Mon, 15 Mar 2010 12:47:09 +0530 Subject: [PATCH 1/3] [FIX] Document : Import declaration was missing for Popen lp bug: https://launchpad.net/bugs/538225 fixed bzr revid: jvo@tinyerp.com-20100315071709-f8mjbm9vb5byht69 --- addons/document/document_directory.py | 6 +++--- addons/document/std_index.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/document/document_directory.py b/addons/document/document_directory.py index bcb86d589d2..17c3dfb66d9 100644 --- a/addons/document/document_directory.py +++ b/addons/document/document_directory.py @@ -65,14 +65,14 @@ class document_directory(osv.osv): objid=self.pool.get('ir.model.data') try: mid = objid._get_id(cr, uid, 'document', 'dir_root') - return None # TODO: check why not display root dir + return False # TODO: check why not display root dir if not mid: - return None + return False except Exception, e: import netsvc logger = netsvc.Logger() logger.notifyChannel("document", netsvc.LOG_WARNING, 'Cannot set directory root:'+ str(e)) - return None + return False return objid.browse(cr, uid, mid, context=context).res_id def _get_def_storage(self,cr,uid,context=None): diff --git a/addons/document/std_index.py b/addons/document/std_index.py index bd61c65e16b..1f639a32fa3 100644 --- a/addons/document/std_index.py +++ b/addons/document/std_index.py @@ -23,7 +23,7 @@ import StringIO import odt2txt from content_index import indexer, cntIndex - +from subprocess import Popen, PIPE def _to_unicode(s): try: From 43f356ec67f042ef97ac70e332913fd82a472276 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Mon, 15 Mar 2010 12:57:07 +0530 Subject: [PATCH 2/3] [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 From d96501aa74af87522161d122ef0096a48c8fd889 Mon Sep 17 00:00:00 2001 From: "GPA(OpenERP)" <> Date: Mon, 15 Mar 2010 13:03:26 +0530 Subject: [PATCH 3/3] [FIX] Analytic : Onchange_event corrected lp bug: https://launchpad.net/bugs/537493 fixed bzr revid: jvo@tinyerp.com-20100315073326-xtqoebz56fxs6lme --- addons/analytic/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/analytic/project.py b/addons/analytic/project.py index 1f24a99d235..e9558f7a101 100644 --- a/addons/analytic/project.py +++ b/addons/analytic/project.py @@ -255,7 +255,7 @@ class account_analytic_account(osv.osv): if not parent_id: return {} parent = self.read(cr, uid, [parent_id], ['partner_id','code'])[0] - childs = self.search(cr, uid, [('parent_id', '=', parent_id), ('active', 'in', [True, False])]) + childs = self.search(cr, uid, [('parent_id', '=', parent_id)]) numchild = len(childs) if parent['partner_id']: partner = parent['partner_id'][0]