summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2010-07-01 20:51:32 +0300
committerP. Christeas <p_christ@hol.gr>2010-07-01 20:51:32 +0300
commit530932640babacde4973fd47f2a9632c1d70bd3d (patch)
tree56dbed7316290a8552674af96bcd73e27d529f00 /addons/document/document.py
parent11c5171326d8eba7d897843ab3182878ac3cdb8f (diff)
Document: fix setting parent of document_file.
There is some code that calls the 'move_to()' in case the document's parent (aka. directory) is changed. Fix notation there. bzr revid: p_christ@hol.gr-20100701175132-8ex94b3pdwkz4lq6
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 27bd9aa3520..428425be930 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -120,7 +120,7 @@ class document_file(osv.osv):
res_model = vals.get('res_model', False)
res_id = vals.get('res_id', 0)
if op == 'write':
- for file in self.browse(cr, uid, ids):
+ for file in self.browse(cr, uid, ids): # FIXME fields_only
if not name:
name = file.name
if not parent_id:
@@ -162,7 +162,7 @@ class document_file(osv.osv):
ids2 = []
result = False
for fbro in self.browse(cr, uid, ids, context=context):
- if fbro.parent_id != vals['parent_id']:
+ if fbro.parent_id.id != vals['parent_id']:
fnode = nodes.node_file(None,None,nctx,fbro)
res = fnode.move_to(cr, fbro, dbro, True)
if isinstance(res, dict):