Skip to Content
Menu
This question has been flagged
1 Reply
4105 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.

Related Posts Replies Views Activity
0
Oct 23
2580
4
Dec 21
31800
2
Dec 20
8639
2
Aug 18
6954
2
Sep 16
7269