summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authoruco (OpenERP) <uco@tinyerp.com>2010-11-15 10:19:34 +0530
committeruco (OpenERP) <uco@tinyerp.com>2010-11-15 10:19:34 +0530
commitf3a868e28d3a74bdff4bdfdbf9b3ec68e9c9dbb7 (patch)
tree1f953fde279e044c776653310a5f8cb7bc2615bf /addons/document/document.py
parentf58df4820f36bfec3ffad087af275de5c2af7e5d (diff)
parent8ad87d0d946ecc5fcfc75f665409828921d2299b (diff)
[MERGE]: Merged with team1.
bzr revid: uco@tinyerp.com-20101112044246-qc1tp6ohth0kduie bzr revid: uco@tinyerp.com-20101115044934-pu05mgdtmmcqs2hz
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 470d67c582b..e3d810668b4 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -74,7 +74,7 @@ class document_file(osv.osv):
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
'write_date': fields.datetime('Date Modified', readonly=True),
'write_uid': fields.many2one('res.users', 'Last Modification User', readonly=True),
- 'res_model': fields.char('Attached Model', size=64, readonly=True),
+ 'res_model': fields.char('Attached Model', size=64, readonly=True, change_default=True),
'res_id': fields.integer('Attached ID', readonly=True),
# If ir.attachment contained any data before document is installed, preserve
@@ -86,7 +86,7 @@ class document_file(osv.osv):
'user_id': fields.many2one('res.users', 'Owner', select=1),
# 'group_ids': fields.many2many('res.groups', 'document_group_rel', 'item_id', 'group_id', 'Groups'),
# the directory id now is mandatory. It can still be computed automatically.
- 'parent_id': fields.many2one('document.directory', 'Directory', select=1, required=True),
+ 'parent_id': fields.many2one('document.directory', 'Directory', select=1, required=True, change_default=True),
'index_content': fields.text('Indexed Content'),
'partner_id':fields.many2one('res.partner', 'Partner', select=1),
'file_size': fields.integer('File Size', required=True),
@@ -245,7 +245,7 @@ class document_file(osv.osv):
# files to be unlinked, update the db (safer to do first, can be
# rolled back) and then unlink the files. The list wouldn't exist
# after we discard the objects
-
+ ids = self.search(cr, uid, [('id','in',ids)])
for f in self.browse(cr, uid, ids, context):
# TODO: update the node cache
par = f.parent_id