[IMP]Change condition to pass test

This commit is contained in:
EL HADJI DEM 2014-03-18 18:23:28 -04:00 committed by Sandy Carter
parent dbe7aac614
commit a9a91394ef

View File

@ -36,9 +36,12 @@ class document_file(orm.Model):
ir_attachment_document_obj = self.pool.get('ir.attachment.document')
original_data = {key: data[key] for key in data.keys()}
# Don't save this information below
data['res_model'] = '' if data['res_model'] else False
data['res_id'] = '' if data['res_id'] else False
data['res_name'] = '' if data['res_name'] else False
if data['res_model']:
data['res_model'] = ''
if data['res_id']:
data['res_id'] = ''
if data['res_name']:
data['res_name'] = ''
res = super(document_file, self).create(cr, uid, data, context=context)
# Create attachment_document_ids with res_model, res_id and res_name
if 'res_model' and 'res_id' in original_data: