summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry (OpenERP) <hmo@tinyerp.com>2010-06-25 13:34:10 +0530
committerHarry (OpenERP) <hmo@tinyerp.com>2010-06-25 13:34:10 +0530
commit2e51e4b29fbf6587768c89853d133e2276bfae2f (patch)
treefc75856b772dd5c02ac44ef5b453c1511226a471
parent30cd371bd2f26d78a981d28700b8f7079ca8f698 (diff)
[FIX] crm, project_issue:
* removed thread_id into send email wizard * pass include_original into context into project issue history form * convert into bug after create new project issue from mail_gateway bzr revid: hmo@tinyerp.com-20100625080410-may2i4h7cx5f8aqs
-rw-r--r--addons/crm/wizard/crm_send_email.py6
-rw-r--r--addons/project_issue/project_issue.py2
-rw-r--r--addons/project_issue/project_issue_view.xml2
3 files changed, 4 insertions, 6 deletions
diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py
index 480ea0f10a1..92cf8e1031b 100644
--- a/addons/crm/wizard/crm_send_email.py
+++ b/addons/crm/wizard/crm_send_email.py
@@ -99,8 +99,7 @@ class crm_send_new_email(osv.osv_memory):
message_id = hist.message_id
model = hist.model
model_pool = self.pool.get(model)
- res_ids = model_pool.search(cr, uid, [('thread_id','=', hist.thread_id.id)])
- res_id = res_ids and res_ids[0] or False
+ res_id = hist.res_id
case = model_pool.browse(cr, uid, res_id)
emails = [obj.email_to]
email_cc = (obj.email_cc or '').split(',')
@@ -206,8 +205,7 @@ class crm_send_new_email(osv.osv_memory):
return {}
model_pool = self.pool.get(model)
- res_ids = model_pool.search(cr, uid, [('thread_id','=', hist.thread_id.id)])
- res_id = res_ids and res_ids[0] or False
+ res_id = hist.res_id
case = model_pool.browse(cr, uid, res_id)
if 'email_to' in fields:
res.update({'email_to': case.email_from or hist.email_from or False})
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 3523485f542..c4d92dc048f 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -332,7 +332,7 @@ class project_issue(osv.osv, crm.crm_case):
if res:
vals.update(res)
res = self.create(cr, uid, vals, context)
-
+ self.convert_to_bug(cr, uid, [res], context=context)
attachents = msg.get('attachments', [])
for attactment in attachents or []:
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 973e0a1a20c..fd523ad7774 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -95,7 +95,7 @@
<button colspan="4"
string="Reply to Last Email"
name="%(crm.action_crm_send_mail)d"
- context="{'mail':'reply', 'model': 'project.issue'}"
+ context="{'mail':'reply', 'model': 'project.issue', 'include_original' : True}"
icon="gtk-undo" type="action" />
</form>
<tree string="Communication history">