[IMP] loosen condition to inject parent id

This commit is contained in:
Holger Brunn 2015-03-04 14:29:38 +01:00
parent 68f3483aa1
commit 34fd9b66f5

View File

@ -28,8 +28,9 @@ class IrAttachment(Model):
load='_classic_read'):
'''inject the extra field we need in the web client. This saves us a
couple of extra client side calls'''
if fields_to_read == ['name', 'url', 'type', 'create_uid',
'create_date', 'write_uid', 'write_date']:
if set(fields_to_read).issuperset(
['name', 'url', 'type', 'create_uid', 'create_date',
'write_uid', 'write_date']):
fields_to_read = fields_to_read + ['parent_id']
result = super(IrAttachment, self).read(
cr, uid, ids, fields_to_read=fields_to_read, context=context,