[IMP]: mailgate, crm: Added subject of sent mail as mailgate.message name

bzr revid: rpa@tinyerp.com-20100525130306-5rcy4n1gw0a0f360
This commit is contained in:
rpa (Open ERP)
2010-05-25 18:33:06 +05:30
parent 53fe5044bd
commit aa3732272d
3 changed files with 9 additions and 8 deletions
+5 -4
View File
@@ -203,12 +203,13 @@ class crm_case(object):
address = self.pool.get('res.partner.address').browse(cr, uid, add)
return {'value': {'email_from': address.email}}
def _history(self, cr, uid, cases, keyword, history=False, email=False, details=None, email_from=False, message_id=False, attach=[], context={}):
def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context={}):
mailgate_pool = self.pool.get('mailgate.thread')
return mailgate_pool._history(cr, uid, cases, keyword, history=history,\
email=email, details=details, \
email_from=email_from, message_id=message_id,\
attach=attach, context=context)
subject=subject, email=email, \
details=details, email_from=email_from,\
message_id=message_id, attach=attach, \
context=context)
def case_open(self, cr, uid, ids, *args):
"""Opens Case
+2 -2
View File
@@ -110,8 +110,8 @@ class crm_send_new_email(osv.osv_memory):
case_pool._history(cr, uid, [case], _('Send'), history=True, \
email=obj.email_to, details=body, \
email_from=email_from, message_id=message_id, \
attach=attach)
subject=obj.subject, email_from=email_from, \
message_id=message_id, attach=attach)
x_headers = dict()
#x_headers = {
+2 -2
View File
@@ -55,7 +55,7 @@ class mailgate_thread(osv.osv):
'log_ids': one2many_domain('mailgate.message', 'thread_id', 'Logs', domain=[('history', '=', False)], required=False),
}
def __history(self, cr, uid, cases, keyword, history=False, email=False, details=None, email_from=False, message_id=False, attach=[], context={}):
def __history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context={}):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -93,7 +93,7 @@ class mailgate_thread(osv.osv):
attachments.append(att_obj.create(cr, uid, {'name': att[0], 'datas': base64.encodestring(att[1])}))
data = {
'name': keyword,
'name': subject or 'History',
'history': True,
'user_id': uid,
'model_id' : model_ids and model_ids[0] or False,