summaryrefslogtreecommitdiff
path: root/addons/project_issue
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2013-01-10 18:27:23 +0100
committerOlivier Dony <odo@openerp.com>2013-01-10 18:27:23 +0100
commitad70edb40b4294468c5cc4f7bcd3b6d4c1b4e334 (patch)
tree92c52af90b7c09eef21082b098ba1639bc74a7cc /addons/project_issue
parent943453798652f3749f1b40fb9f350be743a9eac0 (diff)
[FIX] mail_thread subclasses: message_new must not override the explicitly provided ``custom_values``
This was the case before, but was broken involuntarily during the big mail refactoring for v7. The default values provided by custom message_new methods should only be used as defaults. bzr revid: odo@openerp.com-20130110172723-ym7mcmdllcucj0j3
Diffstat (limited to 'addons/project_issue')
-rw-r--r--addons/project_issue/project_issue.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 5a757fdac39..7b7b6f8a3aa 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -497,17 +497,18 @@ class project_issue(base_stage, osv.osv):
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
- custom_values.update({
+ defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'user_id': False,
- })
+ }
if msg.get('priority'):
- custom_values['priority'] = msg.get('priority')
+ defaults['priority'] = msg.get('priority')
- res_id = super(project_issue, self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
+ defaults.update(custom_values)
+ res_id = super(project_issue, self).message_new(cr, uid, msg, custom_values=defaults, context=context)
return res_id
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):