Created
October 1, 2018 21:19
-
-
Save yk2kus/8434319a22cac2d19a78998c7af13b7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
odoo.define('tko_compose_mail.compose_mail', function (require) { | |
"use strict"; | |
var core = require('web.core'); | |
var session = require('web.session'); | |
var Widget = require('web.Widget'); | |
var SystrayMenu = require('web.SystrayMenu'); | |
var rpc = require('web.rpc'); | |
var _t = core._t; | |
var qweb = core.qweb; | |
var ComposeMailTray = Widget.extend({ | |
template:'ComposeMailTray', | |
events: { | |
// "click": "on_click", | |
"click" : "get_no_of_users" | |
}, | |
set_users: function(data){ | |
console.log("before value ...................", this.users) | |
this.users=data | |
console.log("after value...................", this.users) | |
}, | |
get_no_of_users: function(event){ | |
self = this; | |
this._rpc({ | |
model: 'res.users', | |
method: 'activity_user_count', | |
kwargs: { | |
context: session.user_context, | |
}, | |
}).then(function (data) { | |
self.set_users(data) | |
}); | |
}, | |
on_click: function (event) { | |
var context = {'active_model': 'res.partner', 'active_id': session.partner_id} | |
return this.do_action({ | |
type: 'ir.actions.act_window', | |
name: "Compose Mail", | |
res_model: 'mail.compose.message', | |
views:[[false, 'form']], | |
view_type: 'form', | |
view_mode: 'form', | |
target: 'new', | |
context: context, | |
}); | |
}, | |
start_voip_screenshare_call: function (event) { | |
}, | |
start_voip_audio_call: function (event) { | |
}, | |
start_voip_video_call: function (event) { | |
}, | |
}); | |
SystrayMenu.Items.push(ComposeMailTray); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment