Skip to Content

Text Field in Odoo: The Complete Guide

Everything you need to know about the Text field in the Odoo data model, from basic usage to technical customization
March 6, 2026 by
Text Field in Odoo: The Complete Guide
Dasolo
| No comments yet

Introduction


The Text field is one of the most practical field types in Odoo. Any time a user fills in a notes area, writes a product description, or adds an internal comment on a sales order, there is a good chance they are typing into a Text field.


It looks like a simple textarea in the interface, but understanding its properties and how it fits into the Odoo data model and ORM makes a real difference when you are designing forms, building custom modules, or setting up Odoo Studio fields for your team.

This guide covers everything from what the Text field stores and how it behaves, to real business use cases, technical customization, best practices, and the mistakes most people make when reaching for this field type.

What is the Text Field in Odoo


In the Odoo ORM, fields.Text is the field type for storing multi-line plain text. It maps to a TEXT column in PostgreSQL, with no length restriction. Users can write a single sentence or several paragraphs, and the field handles it equally well.


In forms, it renders as a resizable <textarea> element. In list views, it appears as truncated plain text. In search views, it supports text-based filtering just like the Char field.


Here is what a basic Text field definition looks like in a Python module:

from odoo import fields, models

class SaleOrder(models.Model):
    _inherit = 'sale.order'

    internal_notes = fields.Text(
        string='Internal Notes',
        translate=False,
    )

In Odoo Studio, this field is called Multi-Line Text. When created through Studio, Odoo assigns it an x_studio_ prefix automatically. When you create it through code or the XML-RPC API, you define the technical name yourself.


How It Differs from Char and Html

Three field types in Odoo can store text content, and knowing when to use which one is a common point of confusion:


  • Char field: Single-line text input. Best for short values like names, codes, and references. Supports an optional size limit.
  • Text field: Multi-line textarea. Best for notes, descriptions, and free-form comments. Stores plain text with no formatting.
  • Html field: Multi-line rich text editor. Best for content where formatting matters, such as email templates, product web descriptions, or website pages. Stores HTML markup.

The Text field sits between the two. It gives users more space than a Char field, but without the complexity of HTML markup. For most internal notes and simple descriptions, it is the right choice in the Odoo data model.

How the Field Works


When you add a Text field to an Odoo model, the framework automatically creates the corresponding TEXT column in PostgreSQL during module installation or upgrade. There are no manual SQL migrations involved.


Unlike the Char field, there is no size parameter available on Text fields. The database column imposes no character limit. This is by design: Text fields are intended for open-ended content where limiting the length in advance would not make sense.


Key Field Attributes

The most important properties of a Text field in the Odoo framework:


  • translate: When set to True, the field value can be translated per language. Useful for multilingual Odoo instances where the text changes depending on the user's language.
  • required: Makes the field mandatory at the interface and ORM level. Users cannot save a record without filling it in.
  • default: Sets an automatic default value when new records are created. Can be a static string or a callable method.
  • compute: Links a Python method that generates the field value dynamically. Useful for auto-generated summaries or derived content.
  • store: When combined with compute, controls whether the computed value is saved in the database. With store=True, the value is searchable and available in reports.
  • copy: Controls whether the field value is included when duplicating a record. Defaults to True. Set to False for notes that should not carry over to duplicates.
  • index: Not commonly used on Text fields since full-text indexing works differently from the simple B-tree index used for Char fields. For searchable content, PostgreSQL full-text search or Odoo's built-in filtering is generally sufficient.

How It Appears in Views

In form views, the Text field renders as a <textarea> that users can resize vertically. In list views, content is truncated to fit the column width. In search views, it supports text-based search filters out of the box once you add it to the search view definition.


Unlike Html fields, the Text field does not load a WYSIWYG editor. Users see a plain text area with no formatting toolbar. What they type is exactly what gets stored in the database, with line breaks preserved.


Interaction with the Odoo ORM

From a developer perspective, reading and writing Text fields in Odoo development is straightforward. You access the value directly on the record object, and the ORM handles all persistence. Line breaks are stored as-is. There is no automatic sanitization or escaping applied to plain Text fields, which is one of the reasons it is distinct from the Html field, where Odoo applies sanitization to prevent XSS issues.

Business Use Cases


Text fields appear throughout Odoo in places where users need to write more than a single line. Here are five concrete examples from real business workflows.


Sales: Internal Order Notes

The note field on sale orders and the internal_note field used in some implementations are Text fields. Sales reps use them to record delivery instructions, special packaging requirements, or client preferences that do not fit neatly into a structured field. These notes travel with the order and are visible to operations teams without being printed on customer documents.


Inventory: Product Internal Notes

On the product form, Odoo provides a Notes tab with a Text field for internal comments. Warehouse teams use this to document handling instructions, fragility warnings, or supplier-specific information. Since it is plain text and not displayed on the website or customer documents, it is safe to write operational details that external parties should not see.


Purchase: Vendor Terms and Delivery Instructions

On purchase orders, a Text field for vendor notes allows procurement teams to document specific agreements or delivery constraints that were confirmed over email or phone. Having this information attached to the order record prevents misunderstandings when the goods arrive and the original conversation is no longer easy to find.


CRM: Opportunity Summaries and Meeting Notes

Sales teams working through the CRM pipeline often add a Text field to opportunity records for freeform notes from client meetings, objections raised, or context about the buying process. Unlike chatter messages, a dedicated Text field keeps this information structured and easy to read at a glance when someone else picks up the lead.


HR: Employee and Applicant Comments

HR teams frequently need to capture interview notes, onboarding comments, or performance observations in a field that stays attached to the employee or applicant record. A Text field on the employee model is a clean, simple way to store this without creating a separate model. It is searchable, printable, and easy to include in custom HR reports.

Creating or Customizing the Text Field


There are three main ways to add a Text field to an Odoo model, depending on your technical context and deployment approach.


Using Odoo Studio (No Code)

Odoo Studio is the easiest route for business users and consultants who do not want to write code. To add a Text field with no development work:

  1. Open Odoo Studio from the main menu (requires the Studio app).
  2. Navigate to the form where you want the field.
  3. Drag a Multi-Line Text field from the Studio sidebar onto the form.
  4. Set the label, required status, and any default value in the field properties panel.
  5. Save and close Studio.

Studio handles the field creation and view update automatically. The field gets an x_studio_ prefix and is immediately available on the form without any database migration or server restart.


Using Python in a Custom Module

For any customization that needs to be version-controlled and deployed across multiple environments, defining the field in Python is the right approach. This is standard Odoo development practice:


from odoo import fields, models

class ResPartner(models.Model):
    _inherit = 'res.partner'

    x_client_notes = fields.Text(
        string='Client Notes',
        translate=False,
        copy=False,
    )

After defining the field in the model file, you need to add it to the relevant view XML so it appears in the interface. Odoo creates the database column automatically when you install or upgrade the module. This is the recommended approach for any production Odoo customization that needs to be maintained over time.


Using the XML-RPC API

If you are managing Odoo fields programmatically, for example as part of a deployment script or a remote configuration notebook, you can create Text fields via the XML-RPC API:


field_id = models.execute_kw(
    ODOO_DB, uid, ODOO_API_KEY,
    'ir.model.fields', 'create',
    [{
        'name': 'x_client_notes',
        'field_description': 'Client Notes',
        'model_id': model_id,
        'ttype': 'text',
        'state': 'manual',
        'translate': False,
        'copy': False,
    }]
)

The ttype: text value tells Odoo to create a Text field (as opposed to char for a Char field or html for an Html field). The state: manual setting indicates this field was created outside of a module, which is correct for fields created through Studio or programmatically via the API. This is the approach Dasolo uses when deploying remote field configurations for clients.

Best Practices


1. Use Text when content genuinely needs multiple lines

The most common mistake is reaching for a Text field when a Char field would be enough. If the value is a name, a code, a reference, or anything that fits on one line, use Char. Reserve Text for content where users are expected to write sentences or paragraphs. Using a Text field for a short single-value entry creates a clunky user experience and a misleading data model.


2. Use Html when formatting matters

If users need to add bullet lists, bold text, hyperlinks, or any visual formatting to the content, the Text field is the wrong choice. Use an Html field instead. Text fields only support plain text. Asking users to write formatted content in a plain textarea will lead to frustrated users who expect formatting options that are not there.


3. Enable translate for user-facing multilingual content

In companies running Odoo across multiple languages, any Text field that appears on customer-facing documents or the website should have translate=True. This lets translators provide language-specific versions of the content without overwriting each other's work. For internal notes and operational comments that users write themselves, translation is usually not needed.


4. Set copy=False for notes that should not duplicate

When users duplicate a sale order or a product, Text fields are copied by default. For notes that capture context specific to the original record, such as a client conversation or a specific delivery issue, this can create confusion. Set copy=False on those fields so duplicated records start with a clean notes section.


5. Use compute with store=True for auto-generated summaries

Text fields can be computed dynamically in Odoo. A useful pattern is to build an auto-generated summary field that concatenates values from other fields on the record. With store=True and the appropriate @api.depends() triggers, the computed text is saved in the database and becomes searchable in list views and filters. This is a practical Odoo computed fields technique for creating lightweight internal summaries without building a separate report.

Common Pitfalls


Choosing Text when Html is needed

If a field is meant to hold content displayed on the website or in a formatted PDF report, using Text instead of Html will strip away all formatting. Users who paste content with bullet points or bold text into a Text field will see it rendered as flat, unformatted prose. Always ask whether the output channel needs formatting before choosing the field type.


Choosing Text when Char is the right fit

A Text field renders as a tall resizable textarea. If a field is only ever going to hold a short value like a tracking number or a product variant code, using Text makes the form unnecessarily bulky. Single-line content belongs in a Char field, which renders as a compact text input that fits naturally in a form layout.


Forgetting translate on multilingual labels and descriptions

On Odoo instances deployed across multiple countries, missing the translate=True attribute on a user-facing Text field means all users see the same value regardless of their language setting. This is especially problematic for product descriptions and category notes that are visible in the interface. The fix is straightforward, but adding it after data is already in the system requires a careful migration to avoid overwriting existing values.


Using Text for structured data

A Text field that stores JSON, pipe-separated values, or other hand-crafted structured formats is a maintenance problem waiting to happen. If data has a consistent structure, it should be stored in the appropriate Odoo field types: Selection for fixed options, Many2one for relationships, or a related model with proper fields. Encoding structure inside a free-text field makes it impossible to filter, group, or report on the data reliably.


Not adding the field to the search view

A Text field that holds important information but is not included in the model's search view cannot be filtered from the list view search bar. Users end up scrolling through records to find what they need instead of simply typing a keyword. If a Text field stores information that users will want to search by, add it to the search view definition when creating the field.

Conclusion


The Text field is one of those building blocks in the Odoo framework that looks unremarkable until you start designing forms seriously.


 Choosing between Char, Text, and Html is one of the first decisions you face in any Odoo customization project, and getting it right from the start avoids rework and data quality problems down the line.

Whether you are adding a notes field through Odoo Studio, defining it in a Python module, or creating it programmatically via the API, the patterns in this guide will help you make the right call and configure the field correctly for your use case.


A well-designed Odoo data model is built on small, well-chosen decisions. Picking the right field type for each piece of information is one of them, and the Text field, used in the right context, is a reliable and flexible tool for capturing the kind of content that does not fit neatly into structured fields.

At Dasolo, we help companies implement, customize, and optimize Odoo across all departments. Whether you need help designing a clean data model, building custom fields and workflows, or setting up a full Odoo implementation from scratch, our team is here to support you. Get in touch and let's talk about your Odoo project.

Text Field in Odoo: The Complete Guide
Dasolo March 6, 2026
Share this post
Sign in to leave a comment