Odoo Help


How to display avatar for multiple members with tool tip?

Gavin Yap
on 4/14/16, 2:38 AM 861 views


I have the following code in my kanban view, which I follow the project module 

<div class="oe_kanban_project_avatars">
<t t-foreach="record.member_ids.raw_value.slice(0,4)" t-as="member">
<img t-att-src="kanban_image('res.users', 'image_small', member)" t-att-data-member_id="member" width="24" height="24" class="oe_kanban_avatar"/>

But I am not able to display my tooltip? What did i missed?

Gavin Yap
On 4/16/16, 7:28 AM

In the project module, there is a javascript, project.js,  that helps to display the tool tip for the members and it is place to the assets backend.

By commenting out that this javascript to be used for project module, I was able to display tool tip for mutliple avatars.

openerp.project = function(openerp) {
project_display_members_names: function() {
* Set avatar title for members.
* In kanban views, many2many fields only return a list of ids.
* We can implement return value of m2m fields like [(1,"Adminstration"),...].
var self = this;
var members_ids = [];
// Collect members ids
self.$el.find('img[data-member_id]').each(function() {
// Find their matching names
var dataset = new openerp.web.DataSetSearch(self, 'res.users', self.session.context, [['id', 'in', _.uniq(members_ids)]]);
dataset.read_slice(['id', 'name']).done(function(result) {
_.each(result, function(v, k) {
// Set the proper value in the DOM
self.$el.find('img[data-member_id=' + v.id + ']').attr('title', v.name).tooltip();
on_groups_started: function() {
var self = this;
self._super.apply(self, arguments);
//if (self.dataset.model === 'project.project') {
on_card_clicked: function() {
if (this.view.dataset.model === 'project.project') {
this.$('.oe_kanban_project_list a').first().click();
} else {
this._super.apply(this, arguments);

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/14/16, 2:38 AM
Seen: 861 times
Last updated: 4/16/16, 7:28 AM