Today I was requested to make exactly this on this very same version, so here is my code in case someone else needs it:
Create a new javascript file with the next contents:
odoo.define('message_confirm/static/js/composer.js', function (require) {
'use strict';
const { patch } = require('web.utils');
const components = {
Composer: require('mail/static/src/components/composer/composer.js'),
};
patch(components.Composer, 'message_confirm/static/js/composer.js', {
//--------------------------------------------------------------------------
// Private
//--------------------------------------------------------------------------
/**
* @override
*/
_postMessage() {
if (confirm("Are you sure?") == true){
this._super();
}
},
});
});
*note that you may need to update the path and/or module names
Load the javascript in a view:
For some reasont it wont allow me to put html code in here, so just inherit the "web.assets_backend" view and load your javascript file
Add the view to the manifest:
"data": [
'views/assets.xml',
],
And that's it. Hope it helps out somebody