diff --git a/addons/mail/static/src/components/message/message.js b/addons/mail/static/src/components/message/message.js index aaec2088063..d7800cbfc56 100644 --- a/addons/mail/static/src/components/message/message.js +++ b/addons/mail/static/src/components/message/message.js @@ -295,6 +295,13 @@ class Message extends Component { value.new_value = moment(value.new_value).local().format('LL'); } + } else if (value.field_type === 'boolean') { + if (value.old_value !== undefined){ + value.old_value = value.old_value ? this.env._t("True") : this.env._t("False"); + } + if (value.new_value !== undefined){ + value.new_value = value.new_value ? this.env._t("True") : this.env._t("False"); + } } return value; }); diff --git a/addons/mail/static/src/components/message/message_tests.js b/addons/mail/static/src/components/message/message_tests.js index 8ef1b6d5ab7..73403d71eee 100644 --- a/addons/mail/static/src/components/message/message_tests.js +++ b/addons/mail/static/src/components/message/message_tests.js @@ -1141,7 +1141,7 @@ QUnit.test('rendering of tracked field with change of value from true to false', await this.createMessageComponent(message); assert.strictEqual( document.querySelector('.o_Message_trackingValue').textContent, - "Is Ready:truefalse", + "Is Ready:TrueFalse", "should display the correct content of tracked field with change of value from true to false (Is Ready: true -> false)" ); }); @@ -1163,7 +1163,7 @@ QUnit.test('rendering of tracked field with change of value from false to true', await this.createMessageComponent(message); assert.strictEqual( document.querySelector('.o_Message_trackingValue').textContent, - "Is Ready:falsetrue", + "Is Ready:FalseTrue", "should display the correct content of tracked field with change of value from false to true (Is Ready: false -> true)" ); });