This question has been flagged
1 Reply
3499 Views

please tell me,


I am trying to override one mail javascript to my module javascript how to do it ??

This code is original code of mail module 

 // add anchor tags to urls

msg.body = parse_and_transform(msg.body, add_link);

// Compute url of attachments

_.each(msg.attachment_ids, function(a) {

a.url = '/web/content/' + a.id;

});

return msg;

}


and i am trying to do something like 

msg.body = parse_and_transform(msg.body, add_link);

// Compute url of attachments

_.each(msg.attachment_ids, function(a) {

a.url = (window.location.origin || '') +

'/attachment_viewer/static/src/lib/index.html' +

'?type=' + encodeURIComponent(a.mimetype) +

'&title=' + encodeURIComponent(a.name) +

'#'+ '/web/content/'+a.id;

//a.url = '/web/content/' + a.id;

});


in my module how can i do it 


please give me a right suggestion.

Avatar
Discard
Best Answer

There is another thread that seems to cover this. I'm looking for the same solution. I will try this out: https://www.odoo.com/forum/help-1/question/how-can-i-extend-a-js-web-module-64

Hopefully this helps. 

Avatar
Discard
Author

Thanks Mike.