document: fix for directory.get_full_path()

The trunk ORM would call this function with dir_id=[id,] rather than
the pg84's dir_id=id argument.

bzr revid: p_christ@hol.gr-20101012114436-9xtfjm3oe1oj7d3f
This commit is contained in:
P. Christeas 2010-10-12 14:44:36 +03:00
parent 60f2488feb
commit 829a82a598
1 changed files with 4 additions and 0 deletions

View File

@ -126,6 +126,10 @@ class document_directory(osv.osv):
def get_full_path(self, cr, uid, dir_id, context=None):
""" Return the full path to this directory, in a list, root first
"""
if isinstance(dir_id, (tuple, list)):
assert len(dir_id) == 1
dir_id = dir_id[0]
def _parent(dir_id, path):
parent=self.browse(cr, uid, dir_id)
if parent.parent_id and not parent.ressource_parent_type_id: