mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-24 17:38:42 -06:00
[IMP] loosen condition to inject parent id
This commit is contained in:
parent
68f3483aa1
commit
34fd9b66f5
@ -28,8 +28,9 @@ class IrAttachment(Model):
|
|||||||
load='_classic_read'):
|
load='_classic_read'):
|
||||||
'''inject the extra field we need in the web client. This saves us a
|
'''inject the extra field we need in the web client. This saves us a
|
||||||
couple of extra client side calls'''
|
couple of extra client side calls'''
|
||||||
if fields_to_read == ['name', 'url', 'type', 'create_uid',
|
if set(fields_to_read).issuperset(
|
||||||
'create_date', 'write_uid', 'write_date']:
|
['name', 'url', 'type', 'create_uid', 'create_date',
|
||||||
|
'write_uid', 'write_date']):
|
||||||
fields_to_read = fields_to_read + ['parent_id']
|
fields_to_read = fields_to_read + ['parent_id']
|
||||||
result = super(IrAttachment, self).read(
|
result = super(IrAttachment, self).read(
|
||||||
cr, uid, ids, fields_to_read=fields_to_read, context=context,
|
cr, uid, ids, fields_to_read=fields_to_read, context=context,
|
||||||
|
Loading…
Reference in New Issue
Block a user