[FIX] [IMP] mail: Wall widget: clickable links on the wall now use

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
This commit is contained in:
Thibault Delavallée 2014-02-13 16:16:38 +01:00
parent 65257c48b5
commit 8409791018
2 changed files with 2 additions and 9 deletions

View 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. */

View File

@ -260,7 +260,8 @@
<!-- 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>