From 35077af57dd9203b08bb5bc7f2be65d4a34451b6 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 1 Apr 2015 14:56:41 +0200 Subject: [PATCH] [FIX] opportunity: salesperson not in followers Previously, when updating subscribers of a mail.thread, the default_{key} arguments could override a {key} in the values. e.g: for an new opportunity, the salesperson was overrided by the default user_id This fix gives the priority to the values over the default_ in context. opw-631741 --- addons/mail/mail_thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index fa6e55a1af3..509c097496c 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -263,7 +263,7 @@ class mail_thread(osv.AbstractModel): # auto_subscribe: take values and defaults into account create_values = dict(values) for key, val in context.iteritems(): - if key.startswith('default_'): + if key.startswith('default_') and key[8:] not in create_values: create_values[key[8:]] = val self.message_auto_subscribe(cr, uid, [thread_id], create_values.keys(), context=context, values=create_values)