コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
6434 ビュー

Hi,

I'm trying to extend ChatAction function in mail/client_action.js in odoo 9

I tried .include but its not working

var ChatClientAction = require('mail.chat_client_action');
var Model = require('web.Model');
var ControlPanelMixin = require('web.ControlPanelMixin');

console.log("1", ChatClientAction)
console.log("2", ControlPanelMixin)
console.log("3", Model)

here mail.chat_client_action is returning an undefined value. So i'm not able to extend it.

アバター
破棄
最善の回答

I can console the data of chat manager from mail as below.

var chat_manager = require('mail.chat_manager');
console.log("chat_manager", chat_manager);

but, showing "undefined" when I try to console 'mail.systray'.

I don't know why it is. ! :(
(I think that js has no any return)

アバター
破棄
著作者

have you tried 'mail.chat_client_action'? There are some files which shows this property.

No, But I think that also like that.

In this case, how we can alter the functions in that js files ?

(Duplication is not possible in all time)

著作者

I'm still searching for its answer. To execute it without duplication

I found a reason for this.

最善の回答

I too having the same problem for inheriting the below js files.

1. window_manager.js file in mail module

var window_manager = require('mail.window_manager');

2. client_action.js file in mail module

var chat_client_action = require('mail.chat_client_action');

im always receiving undefined value for above code.

Any solution to fix the issue?


Note:

i'm also extending some other files in mail module that are working,

chat_manager.js & systray.js files.

アバター
破棄
著作者

what i did was changing the xml template calling js file.

Can you share me the code?

関連投稿 返信 ビュー 活動
1
6月 23
2068
1
5月 23
2004
1
10月 22
4168
0
5月 20
3196
2
1月 20
8792