[IMP] mail: turn 'Message/prettyBodyAsMarkup' to field
Task-2793280 closes odoo/odoo#86451 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
+1
-5
@@ -2,14 +2,10 @@
|
||||
|
||||
import { registerMessagingComponent } from '@mail/utils/messaging_component';
|
||||
|
||||
const { Component, markup } = owl;
|
||||
const { Component } = owl;
|
||||
|
||||
export class MessageInReplyToView extends Component {
|
||||
|
||||
get contentAsMarkup() {
|
||||
return markup(this.messageInReplyToView.messageView.message.parentMessage.prettyBody);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {MessageInReplyToView}
|
||||
*/
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<b class="o_MessageInReplyToView_author text-muted ml-2">@<t t-esc="messageInReplyToView.messageView.message.parentMessage.authorName"/></b>
|
||||
<span class="o_MessageInReplyToView_body ml-1" t-on-click="messageInReplyToView.onClickReply">
|
||||
<t t-if="messageInReplyToView.hasBodyBackLink">
|
||||
<t t-out="contentAsMarkup"/>
|
||||
<t t-out="messageInReplyToView.messageView.message.parentMessage.prettyBodyAsMarkup"/>
|
||||
</t>
|
||||
<t t-if="messageInReplyToView.hasAttachmentBackLink">
|
||||
<span class="font-italic mr-2">Click to see the attachments</span>
|
||||
|
||||
@@ -11,6 +11,8 @@ import { session } from '@web/session';
|
||||
import { format } from 'web.field_utils';
|
||||
import { getLangDatetimeFormat, str_to_datetime } from 'web.time';
|
||||
|
||||
const { markup } = owl;
|
||||
|
||||
registerModel({
|
||||
name: 'Message',
|
||||
identifyingFields: ['id'],
|
||||
@@ -575,6 +577,12 @@ registerModel({
|
||||
}
|
||||
return this.date.format('hh:mm');
|
||||
},
|
||||
/**
|
||||
* @returns {Markup}
|
||||
*/
|
||||
_computePrettyBodyAsMarkup() {
|
||||
return markup(this.prettyBody);
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @returns {Thread[]}
|
||||
@@ -903,6 +911,9 @@ registerModel({
|
||||
compute: '_computePrettyBody',
|
||||
default: "",
|
||||
}),
|
||||
prettyBodyAsMarkup: attr({
|
||||
compute: '_computePrettyBodyAsMarkup',
|
||||
}),
|
||||
recipients: many('Partner'),
|
||||
shortTime: attr({
|
||||
compute: '_computeShortTime',
|
||||
|
||||
Reference in New Issue
Block a user