[IMP] calendar: always show placeholder in many2many_attendee widget

Currently the Many2ManyTagsAvatarField only shows the placeholder if the field
is empty. In calendar, however, almost never the attendees are empty because
the organizer is always set as an attendee by default. This commit changes the
template to remove the t-if that exists in the Many2ManyTagsAvatarField, so
that the placeholder is always shown.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
This commit is contained in:
Leonardo Pavan Rocha
2023-10-23 20:07:23 +00:00
parent 69059db23a
commit 8f2594eeb7
2 changed files with 10 additions and 0 deletions
@@ -46,6 +46,8 @@ export class Many2ManyAttendee extends Many2ManyTagsAvatarField {
}
}
Many2ManyAttendee.template = "calendar.Many2ManyAttendee";
export const many2ManyAttendee = {
...many2ManyTagsAvatarField,
component: Many2ManyAttendee,
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-name="calendar.Many2ManyAttendee" t-inherit="web.Many2ManyTagsAvatarField" t-inherit-mode="primary">
<xpath expr="//Many2XAutocomplete" position="attributes">
<attribute name="placeholder">props.placeholder</attribute>
</xpath>
</t>
</templates>