Skip to main content
iVentureTeam

many2many_avatar_resource

The x2many companion to the resource avatar widget. It marks machines with a wrench, shows a hover card only for people, and in kanban it renders the tags in reverse order.

September 18, 2026Updated September 18, 20264 min read
Technical namemany2many_avatar_resource
Field typesmany2many (resource.resource)
Viewsform, list, kanban, card, activity
Also registered aslist.many2many_avatar_resource and kanban.many2many_avatar_resource in Odoo 19. Odoo 20 replaces the kanban variant with card. and adds activity.
Moduleresource_mail, installed with Planning, Field Service and similar apps
Used in core3 uses in Odoo 19, 4 in Odoo 20.
VersionsOdoo 19.0, Odoo 20.0
No-code setupNo. There is no Studio entry for this widget.
Alternativesmany2one_avatar_resource, many2many_avatar_user, many2many_tags_avatar

What the many2many_avatar_resource widget does

This is the x2many form of the resource avatar widget. It builds on the user avatar tags widget from mail and layers resource awareness on top through a mixin applied to all three view variants.

The per-tag rendering is where the resource logic lives:

getTagProps(record) {
    return {
        ...super.getTagProps(...arguments),
        icon: record.data.resource_type === "user" ? null : "fa-wrench",
        colorIndex: record.data.color,
        img: record.data.resource_type === "user"
            ? `/web/image/${this.relation}/${record.resId}/avatar_128`
            : null,
    };
}

A human gets an avatar image and no icon. Anything else gets a wrench and no image. The color index comes from the resource record, so material resources are still distinguishable from each other.

What this means for your team

On a planning or field service record that assigns a mix of people and equipment, this is what stops the two blurring together. A dispatcher scanning a board can see at a glance that a job has two technicians and a lift, rather than three names.

The detail that trips teams up is the hover card. It appears for people and not for machines, which is correct, but users read the absence as a fault. It is worth saying once: there is no card for a machine because there is nothing on a machine record worth showing in one.

Working examples

On a field holding several resources:

<field name="resource_ids" widget="many2many_avatar_resource"/>

The view-specific variants are selected automatically by the view, so you never write the prefix yourself:

<!-- in a list view this resolves to list.many2many_avatar_resource -->
<field name="resource_ids" widget="many2many_avatar_resource"/>

Kanban shows the same resources in the opposite order

The kanban variant carries one override that no option controls and no documentation mentions:

export class KanbanMany2ManyAvatarResourceField extends WithResourceFieldMixin(KanbanMany2ManyTagsAvatarUserField) {
    get tags() {
        return super.tags.reverse();
    }
}

The same record, with the same resources in the same order, renders one way in a form or list and the opposite way on a kanban card. It is intentional, presumably so the avatars stack correctly against the card's overflow counter, but from the outside it looks like a sorting bug.

This matters if anyone on your team compares a board against a list and concludes the data is inconsistent. It is not. Only the display order differs, and only in kanban.

A second detail worth knowing is why the autocomplete is custom. The widget replaces the standard search with its own search_read:

search(request) {
    return this.orm.call(
        this.props.resModel,
        "search_read",
        [this.getDomain(request), ["id", "display_name", "resource_type", "color"]],
        ...
    );
}

The default name search returns only an id and a label, which is not enough to draw the right icon before the tag is created. Fetching resource_type and color in the search means the dropdown itself can show a wrench next to a machine, rather than guessing and correcting after selection.

Version compatibility

VersionStatusNotes
Odoo 19.0VerifiedVerified against the shipped 19.0 source. Three registrations.
Odoo 20.0Partial / changedkanban. variant renamed to card., and an activity. variant added.

The registration variants changed in Odoo 20; the widget behavior did not.

What is changing in Odoo 20

Two registration changes. kanban.many2many_avatar_resource is gone, replaced by card.many2many_avatar_resource, and a new activity.many2many_avatar_resource variant is added for the activity view.

The kanban rename is not specific to this widget: every one of the fourteen kanban. prefixed registrations in Odoo 19 became card. in Odoo 20, because Kanban records now render through a new Card renderer. Zero kanban. field registrations remain.

The base registration and behavior are unchanged, so ordinary views carry over. Custom code referencing the kanban. variant needs renaming.

Common problems and fixes

SymptomCause and fix
Resources appear in a different order on a kanban card than in the listThe kanban variant deliberately reverses the tag order. Working as designed. The underlying data is unchanged.
No hover card appears on some avatarsThe card is shown only for human resources, and never on small screens. Expected for material resources.
Every avatar shows a wrenchresource_type is not resolving to 'user' on those records. Check the resource records. The widget reads resource_type directly to choose the icon.
A kanban.many2many_avatar_resource registration broke after upgrading to Odoo 20All kanban. prefixed field registrations became card. in Odoo 20. Rename it to card.many2many_avatar_resource.

Many2many_avatar_resource widget vs the alternatives

WidgetBest forKey difference
many2many_avatar_resourceSeveral resources, human and material, on one recordMarks machines with a wrench, and reverses tag order in kanban
many2one_avatar_resourceA single resource fieldThe many2one version of this widget
many2many_avatar_userSeveral system usersNo resource type awareness and no wrench icon
many2many_tags_avatarAvatars on any model with an imageGeneric, with no resource logic

Use many2many_avatar_user when the field holds system users and many2many_avatar_employee when it holds employees. Only this one understands that a resource might be a machine, so it is the right choice whenever equipment and people share a field.

Frequently asked questions

Why do resource avatars appear in a different order on kanban cards?+
Because the kanban variant overrides the tags getter and returns super.tags.reverse(). The display order is deliberately reversed on kanban only; the stored data is identical to what a list or form shows.
Why does the hover card only appear on some resource avatars?+
It is shown only when the resource type is user, and never on a small screen. Material resources have no card because there is nothing useful to put in one.
How does Odoo show a wrench for machine resources?+
The widget's getTagProps sets icon to fa-wrench and img to null whenever resource_type is not user, and does the reverse for human resources.
What changes in Odoo 20?+
The kanban. variant is renamed to card. and a new activity. variant is added. The base widget is unchanged, so only custom code that registered the kanban variant needs editing.

Scheduling people and equipment together?

Mixed resource planning goes wrong quietly: a machine double-booked because it looked like a name on a board. We configure Planning and Field Service so capacity, skills and equipment are modeled properly rather than approximated.

Book a free consultation

How this page was produced

Verified by reading addons/resource_mail/static/src/views/fields/many2many_avatar_resource/many2many_avatar_resource_field.js on the 19.0 branch of a local clone of the official Odoo repository. The tag rendering, the reversed kanban order and the custom search_read are quoted verbatim. The hover card condition comes from displayAvatarCard. Registration changes come from diffing against the 20.0 branch. Corrections welcome via our contact page.