From 39c648126e7a067f01edae8a5b7846c1131932ac Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Sun, 25 Sep 2011 03:47:59 +0200 Subject: [PATCH] [FIX] mail.compose.message: do not override with undefined defaults bzr revid: odo@openerp.com-20110925014759-g3ycy8fgmv1zgg9x --- addons/mail/wizard/mail_compose_message.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 0bfaf06890a..93bf0b004d8 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -82,9 +82,9 @@ class mail_compose_message(osv.osv_memory): else: # default mode result['model'] = context.get('active_model', False) - if vals: - for field in fields: - result.update({field : vals.get(field, False)}) + for field in vals: + if field in fields: + result.update({field : vals[field]}) # link to model and record if not done yet if not result.get('model') or not result.get('res_id'):