[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
This commit is contained in:
@@ -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})
|
||||
|
||||
@@ -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 []:
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user