projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44e3d58
)
[FIX] dms: if file does not has any direcotry on creation, take root directory
author
Harry (Open ERP)
<hmo@tinyerp.com>
Thu, 18 Mar 2010 15:30:43 +0000
(21:00 +0530)
committer
Harry (Open ERP)
<hmo@tinyerp.com>
Thu, 18 Mar 2010 15:30:43 +0000
(21:00 +0530)
bzr revid: hmo@tinyerp.com-
20100318153043
-32ict1bcx08pe704
addons/document/document.py
patch
|
blob
|
history
diff --git
a/addons/document/document.py
b/addons/document/document.py
index
375f24c
..
f3ffd2f
100644
(file)
--- a/
addons/document/document.py
+++ b/
addons/document/document.py
@@
-157,6
+157,8
@@
class document_file(osv.osv):
context = {}
vals['title'] = vals['name']
vals['parent_id'] = context.get('parent_id', False) or vals.get('parent_id', False)
+ if not vals['parent_id']:
+ vals['parent_id'] = self.pool.get('document.directory')._get_root_directory(cr,uid, context)
if not vals.get('res_id', False) and context.get('default_res_id', False):
vals['res_id'] = context.get('default_res_id', False)
if not vals.get('res_model', False) and context.get('default_res_model', False):