<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">

    <t t-name="web.RecordSelector" >
        <div class="o_input d-flex flex-wrap gap-1 o_record_selector">
            <span t-if="hasAvatarImg" class="o_avatar o_m2o_avatar">
                <img class="rounded" t-attf-src="/web/image/{{props.resModel}}/{{props.resId}}/avatar_128"/>
            </span>
            <RecordAutocomplete
                resModel="props.resModel"
                value="displayName"
                domain="props.domain"
                context="props.context"
                className="'h-100 flex-grow-1'"
                fieldString="props.fieldString"
                placeholder="props.placeholder"
                multiSelect="false"
                getIds="() => []"
                update.bind="update"
            >
                <t t-set-slot="autoCompleteItem" t-slot-scope="autoCompleteItemScope">
                    <span t-if="isAvatarModel" class="o_avatar_many2x_autocomplete o_avatar d-flex align-items-center">
                        <img class="rounded me-1" t-attf-src="/web/image/{{props.resModel}}/{{autoCompleteItemScope.data.record.id}}/avatar_128"/>
                        <t t-esc="autoCompleteItemScope.label"/>
                    </span>
                    <t t-else="" t-esc="autoCompleteItemScope.label"/>
                </t>
            </RecordAutocomplete>
            <span class="o_dropdown_button"/>
        </div>
    </t>

</templates>
