Skip to main content
iVentureTeam

char_emojis

The char_emojis widget is a standard single-line text input with one addition: an emoji button that opens Odoo's full emoji picker and inserts the chosen emoji at the cursor.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 25, 2026Updated August 25, 20265 min read
Odoo 19 mass mailing form showing the subject field rendered by the char_emojis widget with the emoji picker popover open below the input.
Technical namechar_emojis
Field typeschar, text
Viewsform, list
Modulemail, installed with Discuss and any messaging app
Used in core2 occurrences in 1 module: the mass_mailing Subject and Preview Text fields
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. The widget must be set in XML; Studio's widget list does not offer it.
Alternativestext_emojis, char, html_composer_message

What the Emoji text field does

The char_emojis widget renders exactly like the default single-line text input, with a smiley button appended inside the input group. Clicking the button opens Odoo's shared emoji picker in a popover anchored below the field. Picking an emoji splices its codepoints into the value at the current cursor position, replacing any selected text, then restores focus and moves the cursor past the inserted emoji.

The insertion is done by writing directly to the DOM input and dispatching a synthetic input event followed by a keydown event. The comment in the source explains why: the input event marks the field dirty, and the keydown commits the change so onchange logic fires. The widget is a thin subclass of CharField; everything else, from placeholders to password masking, is inherited unchanged.

What this means for your team

Emojis in subject lines are a deliverability and open-rate lever, not a decoration. Marketing teams that A/B test subjects with and without emojis need a way to insert them reliably, and the OS-level emoji shortcuts are inconsistent across Windows, macOS, and Linux desks. Putting the picker inside the field means every user inserts real Unicode emojis the same way, with no copy-paste from external sites that can drag invisible characters along.

That is precisely why the only two core uses are the mass mailing Subject and Preview Text fields. If your team writes campaign subjects, WhatsApp templates, push notification titles, or any short customer-facing string in a custom model, pointing this widget at that field is a two-minute view change that removes a small daily friction.

Supported options in Odoo 19

char_emojis declares no options of its own. Its descriptor spreads charField, so every option and attribute the standard char widget reads works here too. The table lists the inherited set, verified in char_field.js and emojis_char_field.js on the 19.0 branch.

OptionTypeWhat it does
placeholder_fieldfield nameInherited from the char widget. Names a char field on the current record whose value is shown as the placeholder when the field is empty. Declared in the options metadata since Odoo 19.(since Odoo 19.0)
dynamic_placeholderbooleanInherited and undocumented: read in the char field's extractProps but declared nowhere. Enables the placeholder expression picker used by mail templates. Both core usages of char_emojis set it.
dynamic_placeholder_model_reference_fieldfield nameInherited and undocumented. Names the field holding the model that placeholder expressions are resolved against, for example mailing_model_real on a mailing.

Only placeholder_field is declared in the options metadata. The dynamic_placeholder pair is read in the char field's extractProps without being declared anywhere, which keeps it out of Studio's properties panel. Both core usages of char_emojis rely on that undocumented pair to offer placeholder expressions based on the selected mailing model.

Working examples

The core pattern: mass mailing subject

<field name="subject"
       widget="char_emojis"
       placeholder="e.g. New Sale on all T-shirts"
       options="{'dynamic_placeholder': true, 'dynamic_placeholder_model_reference_field': 'mailing_model_real'}"/>

This is the exact configuration Odoo 19 ships on mailing.mailing: emoji button plus dynamic placeholder expressions resolved against the mailing's recipient model.

Minimal use on any char field

<field name="title" widget="char_emojis"/>

No options are required. The picker button appears automatically in edit mode.

The no-trim override and how insertion works

The base CharField trims leading and trailing whitespace when committing a value. In Odoo 19, EmojisCharField overrides that with a shouldTrim getter returning false, so the value is saved exactly as typed. The practical effect: a subject ending in a space plus an emoji keeps both, where the plain char widget would have stripped the trailing space. In Odoo 16 the same behavior was wired differently, as a shouldTrim: false prop set in extractProps.

The widget also appends o_field_text to its CSS classes, so it styles like a text field rather than a bare char input. The picker itself is the shared component from web/core/emoji_picker, the same one Discuss uses, positioned below the input. The insertion callback lives in a mixin, EmojisFieldCommon, shared with text_emojis; the char version targets the input element while the text version targets the textarea.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Only an internal rewrite is visible on the development branch; see below.
Odoo 19.0VerifiedVerified against the shipped source, including the shouldTrim override.
Odoo 18.0VerifiedByte-identical to the 19.0 source.
Odoo 17.0VerifiedSame behavior; the release that rewrote the widget onto the shared emoji picker.
Odoo 16.0Partial / changedWidget exists under the same name but is a patch-based implementation with the legacy EmojisDropdown component.

Upgrade note. Odoo 16 implemented this widget by patching CharField with two mixins and registering the component class directly, with a legacy EmojisDropdown component instead of the shared picker. Odoo 17 rewrote it onto useEmojiPicker and a descriptor registration. Any 16-era JavaScript patch against EmojisDropdown will not survive a migration to 17 or later; the 17, 18, and 19 files are functionally identical.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The usual caveat applies: the development branch is unstable, nothing below is a released behavior, and this page will be re-verified against the shipped release.

At the time of writing, the development branch shows only an internal migration of emojis_char_field.js and the shared mixin to the new Owl signal API. Element references move from useRef to signal.ref() and the insertion callback reads the target element through a function call, but no option, registration, or behavior change is visible. XML using char_emojis should carry over unchanged.

Common problems and fixes

SymptomCause and fix
No emoji button appears on the fieldThe widget only renders its button in edit mode, and it requires the mail module to be installed. Confirm the record is editable and that widget="char_emojis" is on the field; the widget ships with mail, not web.
Emoji lands at the end instead of where the cursor wasThe field lost focus before the picker opened, so the browser reports selection at position zero or end. Click into the input first, then open the picker; insertion honors selectionStart and selectionEnd.
Emojis show as boxes for some recipientsNot a widget issue. The stored value is plain Unicode; the recipient's device lacks a glyph for that emoji. Prefer widely supported emojis in subject lines and test on the clients your audience uses.
Studio does not offer char_emojis in the widget listThe widget declares no Studio display name and is not part of the documented widget set. Set the widget in the view XML directly, or have a developer add it to the form view.
Trailing space before an emoji disappears after saving on Odoo 18 or earlierThe explicit shouldTrim getter shipped in 19; earlier versions relied on the extractProps flag, which some custom subclasses dropped. On custom subclasses, make sure shouldTrim stays false, or upgrade to 19 where the getter enforces it.

Emoji text field vs the alternatives

WidgetBest forKey difference
char_emojisShort customer-facing strings where emojis matter, like subjectsStandard char input plus a picker button, nothing else changes
text_emojisMultiline notes and SMS bodiesSame picker attached to a textarea instead of an input
charPlain single-line textNo picker, and it trims trailing whitespace on save
html_composer_messageFull email bodiesComplete rich-text composer with its own emoji command

Pick by field type first: char_emojis for single-line fields, text_emojis for multiline. Reach for html_composer_message only when you need a full rich-text composer, which brings its own emoji command.

Frequently asked questions

What does the char_emojis widget do in Odoo?+
It renders a standard single-line text input with an emoji button. Clicking the button opens Odoo's emoji picker and inserts the chosen emoji at the cursor position, replacing any selected text. Everything else behaves like the normal char widget.
Which fields can use char_emojis?+
Any char or text field, since the widget inherits the char field's supported types. In practice it is meant for short single-line values; multiline fields are better served by its sibling text_emojis.
Where does Odoo use char_emojis out of the box?+
Exactly twice, both in Email Marketing: the mailing Subject and the Preview Text fields. Both usages combine it with the dynamic placeholder options so marketers can mix emojis and placeholder expressions.
Can I add char_emojis from Odoo Studio?+
No. Studio's widget selector does not list it, because the widget declares no Studio display name. A developer sets widget="char_emojis" on the field in the view XML, which is a one-line change.
Does char_emojis change how the value is stored?+
Emojis are stored as plain Unicode characters in the same char column. The one storage-visible difference is that the widget disables the char field's whitespace trimming, so leading and trailing spaces survive exactly as typed.
Is char_emojis available in Odoo 16, 17, and 18?+
Yes, under the same name in all of them. Odoo 16 used a different internal implementation based on patches and a legacy dropdown; 17 rewrote it onto the shared emoji picker, and the 18 and 19 files are identical.
Will char_emojis change in Odoo 20?+
The development branch shows only an internal migration to the new Owl signal API, with no option or behavior changes visible. Nothing is final until Odoo 20 ships at the end of September 2026, and this page will be re-verified against the release.

Emojis are the easy part of email marketing

Subject lines, dynamic placeholders, deliverability, and mailing templates all meet in the same form. If your team is building campaign workflows on Odoo or extending mass mailing with custom models, we do that daily for companies on Odoo 16 through 19.

Book a free consultation

How this page was produced

This page was verified by reading emojis_char_field.js, emojis_field_common.js, and the inherited char_field.js on the Odoo 19.0 branch, comparing them against the 16.0, 17.0, and 18.0 branches and the public development branch, and checking both core usages in mailing_mailing_views.xml. The screenshot was captured on a clean Odoo 19 database. Spotted an error? Tell us and we will correct the page.