summaryrefslogtreecommitdiff
path: root/addons/project_issue/project_issue.py
diff options
context:
space:
mode:
authorStephane Wirtel <stephane@openerp.com>2010-08-24 13:20:57 +0200
committerStephane Wirtel <stephane@openerp.com>2010-08-24 13:20:57 +0200
commit81c1a50f3cbb92fdfcec5306ca17ee77ea2e48f2 (patch)
treef49a2ba2ea8e8805a26877664f197f601a4dbbee /addons/project_issue/project_issue.py
parent39be0dc546c19587bef1579db67d6edf8bc1c1be (diff)
[FIX] base_action_rule: Pass the context to the base_action_rule#_action method
[REF] base_action_rule: Remove mutable arguments (context) [REF] base_action_rule: Use getattr instead of hasattr (avoid bugs) [FIX] project_issue: Specify the state_to key in the context from the message_new function (this key will be used in the do_check method of the base_action_rule object) bzr revid: stephane@openerp.com-20100824112057-m9k1m92dnonftscs
Diffstat (limited to 'addons/project_issue/project_issue.py')
-rw-r--r--addons/project_issue/project_issue.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index fb0335967a3..5c5a8907dc9 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -314,7 +314,7 @@ class project_issue(crm.crm_case, osv.osv):
mailgate_pool = self.pool.get('email.server.tools')
- subject = msg.get('subject')
+ subject = msg.get('subject') or _('No Title')
body = msg.get('body')
msg_from = msg.get('from')
priority = msg.get('priority')
@@ -332,6 +332,7 @@ class project_issue(crm.crm_case, osv.osv):
res = mailgate_pool.get_partner(cr, uid, msg.get('from'))
if res:
vals.update(res)
+ context.update({'state_to' : 'draft'})
res = self.create(cr, uid, vals, context)
message = _('An Issue created') + " '" + subject + "' " + _("from Mailgate.")
self.log(cr, uid, res, message)