From dbe7aac614a42264f4140a3fc1ec2b6da3b9158a Mon Sep 17 00:00:00 2001 From: EL HADJI DEM Date: Tue, 18 Mar 2014 18:04:01 -0400 Subject: [PATCH] [IMP]Fix bug to pass tests --- document_multiple_records/document.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/document_multiple_records/document.py b/document_multiple_records/document.py index 48ebb228..3c8af5cc 100644 --- a/document_multiple_records/document.py +++ b/document_multiple_records/document.py @@ -36,9 +36,9 @@ 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'] = '' - data['res_id'] = '' - data['res_name'] = '' + 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 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: