콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4186 화면

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.

아바타
취소
베스트 답변

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. 

아바타
취소
작성자

Thanks Mike.

관련 게시물 답글 화면 활동
0
10월 23
2709
4
12월 21
32056
2
12월 20
8770
2
8월 18
7128
2
9월 16
7402