Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4118 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

Thanks Mike.

Publications associées Réponses Vues Activité
0
oct. 23
2616
4
déc. 21
31903
2
déc. 20
8647
2
août 18
7012
2
sept. 16
7312