I have Odoo 13 set up with an oca_addons directory and also another directory for my custom module.
The oca_addons includes mail_quoted_reply. There are a few other oca_addons installed as well.
I want to modify one of the functions in mail_message_reply.js
However I can’t get it to work as no matter what I try it looks like the oca_addon, or at least the javascript file, is being loaded after mine, essentially overriding the changes I make because the original JavaScript function is being called instead of my inherited one.
What I have tried:
- In my module’s manifest, include ‘mail_quoted_reply’ in depends to force it to load before my module.
- Create a separate assets template and set priority=”1″ to try and force it to take priority.
EDIT – Added JavaScript file.
odoo.define("my_module.mail_message_reply_override", function (require) {
"use strict";
const MailThread = require('mail.widget.Thread');
MailThread.include({
events: _.extend({}, MailThread.prototype.events, {
"click .o_thread_mail_message_reply": "_onClickMailMessageReply",
}),
_onClickMailMessageReply: function (event) {
console.log("This never prints")
},
});
5