Skip to Content

Tech · 2 juin 2026 · 9 min read

QWeb explained simply, without the jargon.

QWeb is Odoo's templating engine. It's HTML with a few extra attributes that decide what to display and when. Its real value is inheritance: you change a page without touching the original file, so you don't break Odoo updates. Five tags are enough to understand the essentials.

If you work with an Odoo website in any capacity, you've probably come across the word QWeb. Often in a confusing sentence from a developer. Here's what it is, what it's for, and why it makes all the difference for a handcrafted website. No prior knowledge needed, just 10 minutes.

QWeb is just HTML that thinks.

Contents

  1. What it really is
  2. The syntax in 5 tags
  3. Inheriting without breaking
  4. Why Odoo chose it
  5. What it makes possible
  6. Key takeaways

When an Odoo developer talks to you about QWeb, it sounds a bit like they're casting a spell. The name doesn't help. Q for what? Web, fair enough. In reality it's probably the simplest and most powerful thing in all of Odoo, provided you grasp one single idea: QWeb is HTML that can think. No more, no less. Here's the full tour, free of jargon.

Reference: QWeb is Odoo's official templating engine, used to generate the frontend and PDF reports from XML. Documentation: Odoo, QWeb Templates, accessed in August 2026.

What it really is.

QWeb is Odoo's templating engine. A template is simply a file that describes what a page looks like, with gaps in it for data that changes. Think of your accountant's Word invoice template: the layout is fixed, but the figures and names change for every client. The web works the same way: a shop's product page always has the same skeleton, but the title, price and photo change depending on the product shown.

In practice, a QWeb file has the .xml extension and looks like HTML. If you can read <p>Hello</p>, you already know 80% of what you need. The rest are special attributes starting with t-. They are what does the magic. By the time the browser receives the page, those attributes are gone: Odoo has turned them into real HTML before sending it.

The key idea

QWeb isn't a complicated language that takes months to learn. It's HTML enriched with six or seven keywords. Once you get it, you can read any Odoo template like an open book.

The syntax in five tags.

All of QWeb fits into a handful of attributes. Remember these and you'll understand 95% of the code you come across. Here they are, in the order you actually meet them.

The basic vocabulary

t-name
The template's name. It's the key Odoo uses to find it, like a unique reference number in a library.
t-call
Inserts another template inside this one. Very handy for calling the site's shared layout (header, footer) without rewriting it.
t-field
Displays a field from the database. The product name, the price, the photo: anything that comes from the ERP.
t-if
Displays the block only if a condition is true. Example: show the promotion only if the product is on sale.
t-foreach
Repeats a block as many times as there are items in a list. The product grid, the list of blog posts, the languages in the menu.
t-set
Defines a variable you can reuse in the template. Handy for SEO titles or conditional CSS classes.

Those six words are genuinely all there is. The rest (t-att, t-options, t-esc) are cousins that will help you out one day, but they aren't essential for reading a template. If you know the six above, you understand what any Odoo page does.

A real example, line by line

Here's what a mini QWeb template that displays a product grid looks like. Read it as HTML with notes in it.

// product_grid.xml
<t t-name="shop.grille">
  <section class="wn-shop">
    <!-- we loop over every product -->
    <t t-foreach="products" t-as="p">
      <article class="wn-card">
        <h3 t-field="p.name"/>
        <span t-field="p.price"/>
        <!-- promo: only shown if on sale -->
        <span t-if="p.on_sale">On sale</span>
      </article>
    </t>
  </section>
</t>

Read it like a recipe: “create a section; for each product, make a card with its name and price; and if it's on sale, show the badge”. That's all. No dark magic. Just HTML that can repeat and apply conditions.

Inheriting without breaking.

This is the QWeb feature that justifies everything else: inheritance. You can take any template shipped by Odoo and change it without touching it. You write a small file alongside it that says “in the original template, at this spot, add this, replace that”. Odoo then assembles everything cleanly every time the page is displayed.

Why is this revolutionary? Because when Odoo releases a new version, the original template is updated by the publisher and your little override file survives. You haven't broken anything. You haven't duplicated code. You've simply laid a layer of customisation on top. That's what lets WebNest change the look of an Odoo site in depth without making future version upgrades painful.

Without inheritance

Duplicate everything.

You copy the entire template, edit it and publish. The day Odoo updates, your version drifts apart and everything has to be redone by hand.

  • Painful maintenance at every upgrade
  • High risk of silent bugs
  • Duplicated code everywhere
With QWeb inheritance

Override surgically.

You describe what you want to change in the original template. Odoo applies your override at render time. The native template stays intact.

  • Odoo upgrades without breakage
  • Readable, targeted customisation
  • Any developer can take it over

QWeb inheritance is the quiet mechanism that makes an Odoo site truly maintainable.

Charlotte Moonen · WebNest

Why Odoo chose it.

There were already very popular templating engines in the Python world: Jinja, Mako, Chameleon. Odoo could have picked one. So why build QWeb in-house? Because the starting constraint was different: templates had to be editable by non-developers, from Odoo's web interface. Not in a code editor. Not with some obscure Python engine syntax.

So the decision was simple: a QWeb template has to look like plain HTML. Any integrator, designer or curious administrator can open it, understand what's going on, and change a piece of text or a CSS class without breaking anything. The t- attributes handle the mechanics, but they don't get in the way of reading. It's elegant.

6tags to know
1single format for back end and front end
0JS framework imposed

Another strength few people appreciate: QWeb is used for web pages as much as for PDF reports and transactional emails. The invoice sent to your client, the welcome email, the home page: everything goes through the same engine. One grammar to learn, three uses covered. That's rare.

What it makes possible in practice.

Everything that makes a WebNest site recognisable relies on QWeb. Here's what we do with it, project after project, and why it matters to you if we work together.

  • Entirely new page templates that replace Odoo's standard templates. Your online shop's product page, an event page, a job listing: we write a version that reflects your brand and plug it into the Odoo engine. All your data stays connected.
  • Surgical overrides on pages we don't want to rebuild completely. The basket, the checkout, the customer account: we keep Odoo's working mechanics and change the look. The client gets native performance and bespoke visuals.
  • Reusable blocks that we call with t-call across several pages. The hero, the testimonials section, the footer: one source file, ten places that use it. Change a comma in the hero and it's updated everywhere.
  • Emails and invoices with the same visual identity as the site. Because QWeb drives them too, everything can be aligned. Your client receives an invoice that doesn't look as though it came from different software than your site.

For partners

If you're an Odoo integrator reading this: a solid command of QWeb inheritance is probably the best front-end return on investment you can make in 2026. Your clients immediately notice the difference between a site that duplicated templates and one that overrides them cleanly.

Key takeaways.

If you only remember three things from this article, make it these. First, QWeb isn't some obscure thing reserved for Odoo developers. It's HTML that can think, with six keywords to learn. You can open any template shipped by Odoo and read it like a book.

Second, inheritance is where the real magic is. It's what allows a serious agency to customise your site without mortgaging your future version upgrades. If someone offers you an Odoo site that duplicates templates instead of overriding them, walk away: you'll pay off that debt later.

Finally, QWeb is a genuine competitive advantage, not a constraint. A single engine for the site, the emails and the PDFs is rare and valuable. It's also what lets us at WebNest deliver radically bespoke sites while staying 100% within the Odoo ecosystem. No external layer, no hacks. Just well-written QWeb.

Frequently asked questions

Do you need to know how to code to understand QWeb?
To read a template, no: it's HTML with a few extra attributes. To write one, you need to know HTML and CSS. QWeb adds five main tags, not a full programming language.
Is QWeb specific to Odoo?
Yes, it's Odoo's in-house templating engine. It isn't a web standard, but the logic is very close to other engines: display a value, loop over a list, show something only under a condition.
Why is inheritance the key point?
Because it lets you change a page without touching the original file. Your changes survive Odoo updates, whereas a view rewritten from scratch is overwritten at the very first update.
Can another developer take over QWeb written by WebNest?
That's exactly why we write standard QWeb, with no added framework. Any Odoo developer can take over the code, and you're not tied to us.

Planning an Odoo website?

We hand-code Odoo websites in Belgium. No templates, no drag-and-drop.

Let's talk about your project

Moonen Charlotte, Founder and CEO at WebNest. Hand-coded Odoo websites.