[FIX] [IMP] mail: Wall widget: clickable links on the wall now use
authorThibault Delavallée <tde@openerp.com>
Thu, 13 Feb 2014 15:16:38 +0000 (16:16 +0100)
committerThibault Delavallée <tde@openerp.com>
Thu, 13 Feb 2014 15:16:38 +0000 (16:16 +0100)
the mail.action_mail_redirect client action that redirects to the correct
form view, like the link used in notification emails.

bzr revid: tde@openerp.com-20140213151638-ev2va4y3tmm9m7i8

addons/mail/static/src/js/mail.js
addons/mail/static/src/xml/mail.xml

index 261ab6f..476f2db 100644 (file)
@@ -977,20 +977,12 @@ openerp.mail = function (session) {
         },
 
         on_record_clicked: function  (event) {
-            event.stopPropagation();
             var state = {
                 'model': this.model,
                 'id': this.res_id,
                 'title': this.record_name
             };
             session.webclient.action_manager.do_push_state(state);
-            this.do_action({
-                res_model: state.model,
-                res_id: state.id,
-                type: 'ir.actions.act_window',
-                views: [[false, 'form']]
-            });
-            return false;
         },
 
         /* Call the on_compose_message on the thread of this message. */
index db0b751..6c64825 100644 (file)
                 <!-- message itself -->
                 <div class="oe_msg_content">
                     <h1 t-if="(widget.show_record_name or widget.subject) and !widget.thread_level" class="oe_msg_title">
-                        <a t-if="widget.options.show_link and widget.show_record_name" class="oe_mail_action_model" t-attf-href="#model=#{widget.model}&amp;id=#{widget.res_id}">
+                        <a t-if="widget.options.show_link and widget.show_record_name" class="oe_mail_action_model"
+                            t-attf-href="#action=mail.action_mail_redirect&amp;model=#{widget.model}&amp;res_id=#{widget.res_id}">
                             <t t-esc="widget.record_name"/>
                         </a>
                         <span t-if="!widget.options.show_link and widget.show_record_name"><t t-esc="widget.record_name"/></span>