diff options
| author | Harry (Open ERP) <hmo@tinyerp.com> | 2009-07-17 14:38:33 +0530 |
|---|---|---|
| committer | Harry (Open ERP) <hmo@tinyerp.com> | 2009-07-17 14:38:33 +0530 |
| commit | e279a5a54c07be6bc6c21c441b1cc7ce78c1d5b7 (patch) | |
| tree | 09f29feaa03154cd1b96dbdd7692e4b8d3bc1039 /addons/document/document.py | |
| parent | 4dc2d24f3fa3c8398a52c8d165a03a144035bd20 (diff) | |
[FIX] document : if name/dirname does not has value, dirname will be display like <objectname><id>
lp bug: https://launchpad.net/bugs/400326 fixed
bzr revid: hmo@tinyerp.com-20090717090833-2bdbliy2fpd2p71f
Diffstat (limited to 'addons/document/document.py')
| -rw-r--r-- | addons/document/document.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/document/document.py b/addons/document/document.py index f8e7c29bb28..1a66145a9d8 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -207,10 +207,11 @@ class node_class(object): ids = obj.search(self.cr, self.uid, where) res = obj.browse(self.cr, self.uid, ids,self.context) - for r in res: - r.name = False + for r in res: if len(obj.fields_get(self.cr, self.uid, [_dirname_field])): r.name = eval('r.'+_dirname_field) + else: + r.name = False if not r.name: r.name = name_for + '%d'%r.id for invalid in INVALID_CHARS: |
