mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-25 18:08:42 -06:00
[IMP]Change condition to pass test
This commit is contained in:
parent
a9a91394ef
commit
6e5f52a548
@ -36,12 +36,10 @@ class document_file(orm.Model):
|
|||||||
ir_attachment_document_obj = self.pool.get('ir.attachment.document')
|
ir_attachment_document_obj = self.pool.get('ir.attachment.document')
|
||||||
original_data = {key: data[key] for key in data.keys()}
|
original_data = {key: data[key] for key in data.keys()}
|
||||||
# Don't save this information below
|
# Don't save this information below
|
||||||
if data['res_model']:
|
if ('res_name', 'res_id', 'res_name') in data.keys():
|
||||||
data['res_model'] = ''
|
data['res_model'] = False
|
||||||
if data['res_id']:
|
data['res_id'] = False
|
||||||
data['res_id'] = ''
|
data['res_name'] = False
|
||||||
if data['res_name']:
|
|
||||||
data['res_name'] = ''
|
|
||||||
res = super(document_file, self).create(cr, uid, data, context=context)
|
res = super(document_file, self).create(cr, uid, data, context=context)
|
||||||
# Create attachment_document_ids with res_model, res_id and res_name
|
# Create attachment_document_ids with res_model, res_id and res_name
|
||||||
if 'res_model' and 'res_id' in original_data:
|
if 'res_model' and 'res_id' in original_data:
|
||||||
|
Loading…
Reference in New Issue
Block a user