this.$element.find('div.oe_mail_thread_display').delegate('img.oe_mail_msg_menu_icon', 'click', function (event) {
self.$element.find('ul.oe_mail_msg_menu').toggle();
});
+ // event: click on "send an email"
+ this.$element.find('div.oe_mail_thread_act').delegate('a.oe_mail_compose', 'click', function (event) {
+ console.log('cacaprout');
+ self.do_action({
+ type: 'ir.actions.act_window',
+ res_model: 'mail.compose.message',
+ views: [[false, 'form']],
+ view_type: 'form',
+ view_mode: 'form',
+ target: 'new',
+ context: {'active_model': self.params.res_model, 'active_id': self.params.res_id, 'mail.compose.message.mode': 'new'},
+ key2: 'client_action_multi',
+ });
+ return false;
+ });
+
},
destroy: function () {
<ul t-name="Thread" class="oe_mail oe_mail_thread">
<div class="oe_mail_thread_act">
+ <a href="#" class="oe_mail_compose">Repley by e-mail</a><br />
<img class="oe_mail_msg_image oe_mail_oe_left" alt="User img"/>
<div class="oe_mail_msg_content">
<textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/><br />
:param dict context: several context values will modify the behavior
of the wizard, cfr. the class description.
"""
+ print context
if context is None:
context = {}
result = super(mail_compose_message, self).default_get(cr, uid, fields, context=context)
<field name="arch" type="xml">
<form string="Compose Email">
<group col="6" colspan="4">
+<!--
<field name="model" invisible="1"/>
<field name="res_id" invisible="1"/>
+-->
+ <field name='filter_id'/>
+<!--
<field name='filter_id' invisible="context.get('active_model',False)"/>
- <field name="email_from" colspan="4" required="1"/>
+-->
+ <newline/>
+ <field name="email_from" colspan="4" required="1"/>
<field name="email_to" colspan="4" required="1"/>
<field name="email_cc" colspan="4"/>
<field name="email_bcc" colspan="4"/>
<field name="reply_to" colspan="4"/>
<field name="subject" colspan="4" widget="char" size="512"/>
+ <separator string="Debug information" colspan="6"/>
+ <field name="model"/>
+ <field name="res_id"/>
+ <newline/>
+ <field name="references"/>
+ <field name="message_id"/>
+<!--
<field name="references" invisible="1"/>
<field name="message_id" invisible="1"/>
+-->
</group>
<notebook colspan="4">
<page string="Body">