Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4121 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

Thanks Mike.

Post correlati Risposte Visualizzazioni Attività
0
ott 23
2616
4
dic 21
31921
2
dic 20
8647
2
ago 18
7019
2
set 16
7313