[MERGE] merge with main branch
bzr revid: mra@tinyerp.com-20100315080946-iv6ou6hg4s6r3kep
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -23,7 +23,7 @@ import StringIO
|
||||
import odt2txt
|
||||
|
||||
from content_index import indexer, cntIndex
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
def _to_unicode(s):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user