diff --git a/addons/crm/wizard/email_compose_message.py b/addons/crm/wizard/email_compose_message.py
index 8f995b5e256..4bb55009c0e 100644
--- a/addons/crm/wizard/email_compose_message.py
+++ b/addons/crm/wizard/email_compose_message.py
@@ -38,10 +38,10 @@ class email_compose_message(osv.osv_memory):
model_obj = self.pool.get(model)
data = model_obj.browse(cr, uid , resource_id, context)
result.update({
- 'name' : data.name or False,
+ 'subject' : data.name or False,
'email_to' : data.email_from or False,
'email_from' : data.user_id and data.user_id.address_id and data.user_id.address_id.email or False,
- 'description' : '\n' + (tools.ustr(data.user_id.signature or '')),
+ 'body' : '\n' + (tools.ustr(data.user_id.signature or '')),
'email_cc' : tools.ustr(data.email_cc or ''),
'model': model or False,
'res_id': resource_id or False,
diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml
index 3c6cc536731..a3bfdc1be02 100644
--- a/addons/crm_claim/crm_claim_view.xml
+++ b/addons/crm_claim/crm_claim_view.xml
@@ -187,13 +187,13 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -46,7 +46,6 @@
-
diff --git a/addons/email_template/wizard/email_compose_message.py b/addons/email_template/wizard/email_compose_message.py
index 0c584c98990..2fcc158a333 100644
--- a/addons/email_template/wizard/email_compose_message.py
+++ b/addons/email_template/wizard/email_compose_message.py
@@ -62,8 +62,8 @@ class email_compose_message(osv.osv_memory):
result = super(email_compose_message, self).default_get(cr, uid, fields, context=context)
template_id = context.get('template_id', False)
vals = {}
- if template_id and context.get('email_model') and context.get('email_res_id'):
- vals = self.get_template_data(cr, uid, context.get('email_res_id'), template_id, context)
+ if template_id and context.get('active_model') and context.get('active_id'):
+ vals = self.get_template_data(cr, uid, context.get('active_id'), template_id, context)
if not vals:
return result
@@ -116,8 +116,8 @@ class email_compose_message(osv.osv_memory):
message_pool = self.pool.get('email.message')
message_data = message_pool.browse(cr, uid, int(context.get('message_id')), context)
model = message_data.model
- elif context.get('email_model',False):
- model = context.get('email_model')
+ elif context.get('active_model',False):
+ model = context.get('active_model')
if model:
record_ids = email_temp_pool.search(cr, uid, [('model','=',model)])
return email_temp_pool.name_get(cr, uid, record_ids, context) + [(False,'')]
@@ -127,13 +127,13 @@ class email_compose_message(osv.osv_memory):
'template_id': fields.selection(_get_templates, 'Template'),
}
- def on_change_template(self, cr, uid, ids, model, resource_id, template_id, context=None):
+ def on_change_template(self, cr, uid, ids, model, template_id, context=None):
if context is None:
context = {}
if context.get('mail') == 'reply':
return {'value':{}}
- result = self.on_change_referred_doc(cr, uid, [], model, resource_id, context=context)
- vals = result.get('value',{})
+ vals = {}
+ resource_id = context.get('active_id', False)
if template_id and resource_id:
vals.update(self.get_template_data(cr, uid, resource_id, template_id, context))
else:
diff --git a/addons/email_template/wizard/email_compose_message_view.xml b/addons/email_template/wizard/email_compose_message_view.xml
index fdac0cc0c23..0a99d2af5e9 100644
--- a/addons/email_template/wizard/email_compose_message_view.xml
+++ b/addons/email_template/wizard/email_compose_message_view.xml
@@ -8,12 +8,9 @@
form
-
+
-
+ on_change="on_change_template(model, template_id, context)"/>
diff --git a/addons/email_template/wizard/email_template_send_wizard.py b/addons/email_template/wizard/email_template_send_wizard.py
index 30ab10b9e82..67a13d3e4d0 100644
--- a/addons/email_template/wizard/email_template_send_wizard.py
+++ b/addons/email_template/wizard/email_template_send_wizard.py
@@ -128,13 +128,6 @@ class email_template_send_wizard(osv.osv_memory):
# result['attachment_ids']['domain'] = [('res_model','=',context['src_model']),('res_id','=',context['active_id'])]
# return result
- def save_to_drafts(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
- mailid = self.save_to_mailbox(cr, uid, ids, context=context)
- self.pool.get('email.message').write(cr, uid, mailid, {'state': 'outgoing'}, context)
- return {'type': 'ir.actions.act_window_close'}
-
def send_mail(self, cr, uid, ids, context=None):
if context is None:
context = {}
diff --git a/addons/email_template/wizard/email_template_send_wizard_view.xml b/addons/email_template/wizard/email_template_send_wizard_view.xml
index 90c2648b1de..f82288575bb 100644
--- a/addons/email_template/wizard/email_template_send_wizard_view.xml
+++ b/addons/email_template/wizard/email_template_send_wizard_view.xml
@@ -33,7 +33,7 @@
-
+
@@ -52,12 +52,8 @@
-
-
-
-
diff --git a/addons/event/event.py b/addons/event/event.py
index 5e757d02903..e4728677bca 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -27,7 +27,6 @@ from tools.translate import _
import decimal_precision as dp
from crm import wizard
-wizard.email_compose_message.email_model.append('event.registration')
class event_type(osv.osv):
""" Event Type """
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index c89be32a049..00289183e3a 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -403,13 +403,13 @@
-
+
-
+
-
+