[FIX] domain resolution for Document button in project FORM

lp bug: https://launchpad.net/bugs/1075436 fixed

bzr revid: api@openerp.com-20121107144845-yi437u8w9fbcgs3u
This commit is contained in:
Arnaud Pineux
2012-11-07 15:48:45 +01:00
parent a3c59a1b4e
commit 153ab3b020
+1 -5
View File
@@ -203,11 +203,7 @@ class project(osv.osv):
def attachment_tree_view(self, cr, uid, ids, context):
task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
domain = [
('|',
'&', 'res_model', '=', 'project.project'), ('res_id', 'in', ids),
'&', ('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)
]
domain = ['|', '&', ('res_model', '=', 'project.project'), ('res_id', 'in', ids), '&', ('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)]
res_id = ids and ids[0] or False
return {
'name': _('Attachments'),