From 3fa154178f348c3d06295d5ab5f2e86b9e9fc1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 6 Apr 2012 13:33:50 +0200 Subject: [PATCH] [FIX] Fixed email not displaying their bodies in feeds. bzr revid: tde@openerp.com-20120406113350-u3uahnk4kj26ca0d --- addons/mail/static/src/js/mail.js | 11 ++++++----- addons/mail/static/src/xml/mail.xml | 7 ++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 72647ce17b4..75eed5e51d6 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -273,15 +273,16 @@ openerp.mail = function(session) { if (record.type == 'email') { record.mini_url = ('/mail/static/src/img/email_icon.png'); } else { record.mini_url = this.thread_get_avatar('res.users', 'avatar', record.user_id[0]); } // body text manipulation - record.body_text = this.do_clean_text(record.body_text); - record.tr_body_text = this.do_truncate_string(record.body_text, this.params.msg_more_limit); - record.body_text = this.do_replace_internal_links(record.body_text); - if (record.tr_body_text) record.tr_body_text = this.do_replace_internal_links(record.tr_body_text); + record.body = this.do_clean_text(record.body); + record.tr_body = this.do_truncate_string(record.body, this.params.msg_more_limit); + record.body = this.do_replace_internal_links(record.body); + if (record.tr_body) record.tr_body = this.do_replace_internal_links(record.tr_body); + console.log(record.body); // render $(session.web.qweb.render('ThreadMsg', {'record': record, 'thread': this, 'params': this.params, 'display': this.display}) ).appendTo(this.$element.children('div.oe_mail_thread_display:first')); // truncated: hide full-text, show summary, add buttons - if (record.tr_body_text) { + if (record.tr_body) { var node_body = this.$element.find('span.oe_mail_msg_body:last').append(' [ ... Show less]'); var node_body_short = this.$element.find('span.oe_mail_msg_body_short:last').append(' [ ... Show more]'); node_body.hide(); diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index b2c72792b04..0f49902b6b3 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -66,8 +66,8 @@

- - + +
@@ -90,7 +90,8 @@ Subject:

- + +