Odoo19 Form View Creation Guide for Developers

TEAM-TRANSINES
November 12, 2025

Odoo’s modular design makes it very simple to create powerful and easy-to-use interfaces. form View in Odoo19   are one of the most important interfaces that lets users to add and change records.

This guide will show you how to make a form view in Odoo19 from the ground up.  We’ll go through each step by making a simple example called Library Management.

What Is a Form View in Odoo19?

A form view in Odoo displays the details of a single record and allows users to create, modify or delete that record.

A form view in Odoo shows the details of one record and lets users add, change, or delete that record:

  • <sheet> – wraps form content neatly.
  • <group> – groups fields in columns.
  • <notebook> and <page> – create tabbed layouts.
  • <header> – used for action buttons or status indicators.

Example Project: Library Book Form

Now Let’s make a new Odoo module that keeps track of the library books.

We will make a model library.book.ext and a form view to keep track of book information.

Create the Module Structure

To start make a new folder in the Odoo addons folder:

odoo/addons/library_book_ext/

Make the following files and folders inside it:

library_book_ext/ 
├── __init__.py 
├── __manifest__.py 
├── models/ 
│   ├── __init__.py 
│   └── library_book_ext.py 
└── views/ 
    └── library_book_ext_views.xml 

Define the Manifest File

# __manifest__.py 
{ 
    "name": "Library Book Extension", 
    "version": "19.0", 
    "depends": ["base"], 
    "author": "Your Name", 
    "category": "Library", 
    "summary": "Manage library books with form view example", 
    "description": "A simple module demonstrating form view creation in Odoo 
19.", 
    "data": [ 
        "views/library_book_ext_views.xml", 
    ], 
    "installable": True, 
    "application": False, 
} 

Define the Model

# models/library_book_ext.py 
from odoo import models, fields 
 
class LibraryBookExt(models.Model): 
    _name = "library.book.ext" 
    _description = "Library Book (Extended)" 
 
    name = fields.Char(string="Title", required=True) 
    author = fields.Char(string="Author") 
    pub_date = fields.Date(string="Publication Date") 
    isbn = fields.Char(string="ISBN") 

Create the Form View (XML)

<!-- views/library_book_ext_views.xml --> 
<odoo> 
  <!-- Form View --> 
  <record model="ir.ui.view" id="view_library_book_ext_form"> 
    <field name="name">library.book.ext.form</field> 
    <field name="model">library.book.ext</field> 
    <field name="arch" type="xml"> 
      <form string="Book Details"> 
        <sheet> 
          <group> 
            <field name="name"/> 
            <field name="author"/> 
          </group> 
          <group> 
            <field name="pub_date"/> 
            <field name="isbn"/> 
          </group> 
        </sheet> 
      </form> 
    </field> 
  </record> 
 
  <!-- List View (optional) --> 
  <record model="ir.ui.view" id="view_library_book_ext_list"> 
    <field name="name">library.book.ext.list</field> 
    <field name="model">library.book.ext</field> 
    <field name="arch" type="xml"> 
      <list string="Books"> 
        <field name="name"/> 
        <field name="author"/> 
        <field name="pub_date"/> 
      </list> 
    </field> 
  </record> 
 
  <!-- Action and Menu --> 
  <record model="ir.actions.act_window" id="action_library_book_ext"> 
    <field name="name">Books</field> 
    <field name="res_model">library.book.ext</field> 
    <field name="view_mode">tree,form</field> 
  </record> 
 
  <menuitem id="menu_library_root" name="Library"/> 
  <menuitem id="menu_library_books" name="Books" 
parent="menu_library_root" 
            action="action_library_book_ext"/> 
</odoo> 

Update the Apps and Install the Module

Now Open the Odoo and Click on the Update Apps List in the Apps section and Find the “Library Book Extension.”

Click and Install

Now Navigate to the Library and Books

You’ll see a tree view of the books Click Create and the form view you just made will show up.

"Automate Your Business with our Customized Odoo ERP Solutions"

"Get a Cost Estimate for Your ERP Project, Absolutely FREE!"

Get a Free Quote

Leave a Reply

Your email address will not be published. Required fields are marked *