code_ir_ui_view
code_ir_ui_view is the code editor Odoo puts on the arch field of the Views screen. It is the ace widget with a different editor component bolted on, and it is applied in a way a normal search will never find.
September 18, 2026Updated September 18, 20264 min read
| Technical name | code_ir_ui_view |
|---|---|
| Field types | text, html |
| Views | form |
| Module | web, present in every Odoo database |
| Used in core | Applied once, on the arch field of the View form, via addons/web/views/ir_ui_view_views.xml. It is set with an <attribute name="widget"> in an inherited view rather than a widget attribute. |
| Versions | Odoo 19.0, Odoo 20.0 |
| No-code setup | No. This is a technical widget on a technical screen. |
| Alternatives | code, html, text |
What the code_ir_ui_view widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
mode | string | The Ace syntax mode, for example xml or python. Inherited from the ace descriptor rather than declared on this widget, so it does not appear in a static scan of this file. Ace's own extractProps reads it as options.mode. |
Working examples
Why searching for this widget finds nothing
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 19.0 | Verified | Verified against the shipped 19.0 source, including the inherited ace descriptor. |
| Odoo 20.0 | Verified | Registration unchanged. Inherits ace's new lineWrapping option. |
Unchanged between the two branches we checked.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| A search for widget="code_ir_ui_view" finds nothing | Odoo applies it through an inherited <attribute name="widget"> rather than a widget attribute. Search for the widget name alone, without the widget= prefix. |
| The mode option appears to be undocumented | It is inherited from the ace descriptor via a spread, so tooling that scans a single file misses it. Read ace_field.js in the ace folder. mode is declared there and read by ace's extractProps. |
| The editor does not appear on a non-text field | The inherited supportedTypes are text and html only. Check the browser console. Odoo logs a warning on a type mismatch and renders anyway rather than failing. |
Code_ir_ui_view widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
code_ir_ui_view | Editing view architecture on the Views screen | The ace widget with a view-specific editor component and styling class |
| code | General code editing on a text field | Same ace descriptor, generic editor component |
| html | Content users write, not code | Rich text editing rather than raw markup |
| text | Plain multi-line text | No highlighting and no editor component |
Frequently asked questions
What is the code_ir_ui_view widget in Odoo?+
Why can I not find widget="code_ir_ui_view" in the Odoo source?+
Does code_ir_ui_view have options?+
Does it change in Odoo 20?+
View edits happening straight in the database?
Editing view arch through the Views screen leaves no review, no history and no way back when a form stops rendering. We move those changes into a proper module with version control, and clean up the ones already applied by hand.
Book a free consultation