account_document_state
Government e-invoicing replies rarely fit in a status column. account_document_state renders the selection state and, whenever the record carries a message, adds an info icon whose popover shows the full text with a copy button.
| Technical name | account_document_state |
|---|---|
| Field types | selection, many2one |
| Views | list (embedded e-invoicing document lists) |
| Module | account (Invoicing) |
| Used in core | 2 occurrences across 2 modules: l10n_gr_edi, l10n_ro_edi |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0 |
| No-code setup | No. Applied in view XML together with an invisible message column |
| Alternatives | selection, selection_badge, state_selection |
What the document state field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
placeholder_field | field name (inherited, dead) | Declared by the base selection descriptor this widget spreads, but the base extractProps never reads it, so setting it does nothing. Listed to keep the inherited surface honest.(since Odoo 19.0) |
The message must be loaded, not just exist. The widget reads record.data.message and declares no fieldDependencies, so a list that omits the column shows a bare state forever. Core's own views demonstrate both outcomes: myDATA and e-Transport load <field name="message" column_invisible="1"/>, while the 19.0 E-Factura list does not, and its icon consequently never appears.
Working examples
Popover mechanics and an unloaded message in core
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Byte-identical on the development branch; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source; unchanged from 17. |
| Odoo 18.0 | Verified | Same component and behavior. |
| Odoo 17.0 | Verified | Introduced here alongside the e-invoicing document models. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. Nothing changes between 17, 18 and 19; views and custom usages carry over untouched. Databases upgraded from 16 gain the widget with whichever localization module ships it.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| No info icon although the document has an error | The message field is not loaded in the view; the widget reads record.data.message with no declared dependencies. Add <field name="message" column_invisible="1"/> to the list, the fix the E-Factura list itself needs. |
| Copy button does nothing | navigator.clipboard requires a secure context. Serve Odoo over HTTPS (or use localhost in development). |
| Popover opens above and gets clipped in a short list | The position is hardcoded to top. Accept the flip the popover service applies, or subclass with a different position. |
| Message shows as one long line elsewhere | Only the popover preserves line breaks; other renderings of the field do not. Read the message through the widget's popover, or format it in a custom view. |
| State column stops being editable | Core's embedded lists set edit and create to false; the widget itself does not force readonly. Expected in the localization lists; on custom views the selection stays editable. |
Document state field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
account_document_state | Status columns that carry a server or government response worth reading | Selection rendering plus a popover fed by a hardcoded message field, with clipboard copy |
| selection | Plain editable selection fields | No icon, no popover; this widget is the base plus the message affordance |
| selection_badge | Selection rendered as clickable colored badges | Stronger visual state but no path to an explanation text |
| state_selection | The three-dot kanban state with quick switching | A different interaction model entirely; no message display |
Frequently asked questions
Which field feeds the popover?+
Why does the Greek list show the icon but the Romanian E-Factura list never does?+
Can I use account_document_state on my own model?+
Does the widget work in form views?+
Is the message stripped or truncated in the popover?+
E-invoicing mandates keeping your finance team guessing?
myDATA, E-Factura, PEPPOL: every mandate has its own states, errors and deadlines. Our Odoo consultants set up compliant e-invoicing flows and make rejection reasons readable where your team works, not buried in government portals.
Book a free consultation