No Coding Fear: Basic Odoo XML Tweaks

No Coding Fear: Basic Odoo XML Tweaks for Beginners

Think XML is scary? Think again!

Imagine you’re using Odoo for your business, but the default views feel cluttered. The tree view shows too many columns, and the forms have fields you never use. You wish you could tweak them—just a little—to make data entry faster. But then you hear "XML" and panic. Coding? Not for me!

Here’s the truth: basic Odoo XML tweaks are simpler than you think. You don’t need to be a developer to customize views. With a few copy-paste examples and minor adjustments, you can make Odoo work for you.

Let’s break it down—no jargon, no fear.


Why Customize Odoo Views?

Before diving into how, let’s talk about why:

  • Faster data entry – Hide unnecessary fields to speed up workflows.
  • Cleaner interface – Show only what’s relevant to your team.
  • Better usability – Rearrange forms to match your business process.

Small tweaks = Big efficiency gains.


XML in Odoo: Not as Scary as It Sounds

Yes, Odoo uses XML for views, but you don’t need to "code" from scratch. Most customizations involve:

  1. Finding the right view (tree, form, kanban).
  2. Copying a snippet from Odoo’s documentation/forum.
  3. Pasting and tweaking field names or attributes.

That’s it!


3 Simple XML Tweaks Anyone Can Do

1. Hiding Columns in Tree View

Problem: Too many columns clutter your list view.

Solution:

  • Go to Settings → Technical → User Interface → Views.
  • Find the tree view you want to edit (e.g., res.partner.tree).
  • Add invisible="1" to fields you want to hide.

Example:

<field name="phone" invisible="1"/>  

Now, the "phone" column won’t appear.


2. Making Fields Read-Only in Forms

Problem: Some fields should only be set once (e.g., "Creation Date").

Solution:
Add readonly="1" to the field.

Example:

<field name="create_date" readonly="1"/>  

3. Changing Field Order in Forms

Problem: The default form layout doesn’t match your workflow.

Solution:
Move fields inside <group> tags to rearrange them.

Example:

<group>  
    <field name="name"/>  
    <field name="email"/>  
</group>  

Where to Find Ready-to-Use XML Snippets

Don’t write from scratch—borrow and tweak!

Odoo Forum (forum.odoo.com) – Search for "how to hide a field in tree view."
Odoo GitHub – Check official modules for examples.
Odoo Documentation – Look up "Views" in developer docs.


Final Tip: Use the "Developer Mode"

Enable Developer Mode (Settings → Activate Developer Mode) to:

  • View technical names of fields (needed for XML edits).
  • Edit views on-the-fly (right-click → Edit View).

What’s Stopping You? Give It a Go!

You don’t need to be a programmer to make Odoo fit your needs. Start small:

  1. Pick one view that annoys you.
  2. Find a similar example online.
  3. Test in a backup database first.

The worst that can happen? You undo the change. The best? You save hours of scrolling and clicking.

Which Odoo view will you customize first? 🚀

Odoo Pro Tip: Dynamic Views with JavaScript