For many eCommerce businesses, pricing is not the only thing that changes when a customer selects a product variant.

Sometimes, taxes change too.

A different material, packaging option, configuration, or add-on may require a different VAT rule. But most ERP and eCommerce systems apply taxes only at the product level, making it difficult to manage real-world tax scenarios.

This becomes even more complicated when businesses use:

  • dynamic pricing rules
  • supplier-cost-based pricing
  • quantity discounts
  • multi-country VAT rules
  • dropshipping vendors
  • configurable products

In such situations, applying tax logic at variant-level becomes essential.

Let’s look at a common scenario many businesses face.

The Problem: Taxes Don’t Always Apply at Product Level

If you run an eCommerce business selling configurable products, your catalog might include products where:

  • different materials have different VAT
  • optional add-ons have separate taxes
  • some configurations include eco taxes
  • export customers require different tax mappings
  • supplier-cost pricing affects final tax calculation

However, standard ERP behavior often applies taxes only on the product template, not on the variant configuration or pricing rule.

This leads to several problems:

  • incorrect VAT on website orders
  • inconsistent pricing between product page, cart, and checkout
  • manual tax corrections in sales orders
  • difficulty combining dynamic pricing and taxes

For growing eCommerce businesses, this becomes a major operational risk.

The Solution: Variant-Based Tax Logic in Odoo

To address this, the solution involves we’ve derieved a custom solution- we’ve created tax logic at two levels inside Odoo:

  • Pricelist Rules
  • Product Attribute Configuration

This ensures the system always applies the correct tax based on how the product is configured and priced.

1. VAT Defined in Pricelist Rules

The first improvement is adding a Tax (VAT) field directly to Odoo Pricelist Rules.

This allows taxes to be defined alongside pricing logic.

Now the system works like this:

  1. Odoo calculates the final price using the pricelist rule
  2. Discounts, margins, cost formulas, or supplier pricing are applied
  3. The correct VAT from the pricelist rule is applied afterward

If no tax is defined in the pricelist rule, the system automatically falls back to the product’s default tax.

This approach ensures pricing strategies and taxes stay aligned.

2. VAT Applied to Attribute Extra Prices

In many eCommerce setups, some attributes do not generate variants but still add extra price.

Examples include:

  • gift packaging
  • premium material
  • optional accessories
  • customization options

In these cases, taxes must apply only to the extra price, not the full product price.

To handle this, tax fields are added to attribute configurations.

This allows:

  • the base product price to follow pricelist VAT
  • the extra attribute price to apply its own tax rule

This ensures accurate tax calculation when customers customize products.

How the Tax Logic Works in Odoo?

The system supports two common scenarios.

Scenario 1 – Variant-Based Pricing

When product variants exist:

  • the system calculates price using the pricelist rule
  • VAT from the pricelist rule is applied
  • fiscal positions adjust taxes if needed

How to Handle Variant Explosion in Odoo>>

Scenario 2 – Attribute-Based Extra Price

When variants are not created but attributes add extra price:

  • base product price receives VAT from pricelist
  • attribute extra price receives VAT from attribute configuration

This ensures both components of the price are taxed correctly.

Where Customers See Correct Pricing

A key requirement for eCommerce businesses is price consistency across the entire buying journey.

With variant-based tax logic, prices remain accurate in:

  • Product page (variant selection)
  • Cart and mini cart
  • Wishlist
  • Checkout page
  • Sales orders
  • Invoices
  • Accounting records

Customers always see the correct price including or excluding VAT, depending on system configuration.

Built to Work with Odoo’s Native Tax Engine

Another important aspect is maintaining compatibility with Odoo’s standard tax behavior.

The solution respects:

  • tax-included pricing
  • tax-excluded pricing
  • multiple taxes (VAT + eco tax)
  • fiscal positions
  • customer-specific tax rules

For example:

If a pricing rule applies 21% VAT, but the customer’s fiscal position maps it to 0% export VAT, the system automatically updates the tax.

No manual changes required.

Success Criteria: What Businesses Gain

When variant-based tax logic is implemented correctly, businesses see immediate improvements.

Accurate Pricing

Taxes match the exact product configuration selected by the customer.

Reduced Manual Work

Sales teams no longer correct VAT on sales orders.

Automated Pricing + Tax Logic

Dynamic pricing rules work seamlessly with taxes.

Better Customer Experience

Customers always see the correct price before checkout.

Reliable Accounting

Invoices, tax reports, and accounting entries remain accurate.

For modern eCommerce businesses, pricing and taxation can’t operate independently.

When customers configure products dynamically, the system must calculate:

  • the correct price
  • the correct tax
  • in real time

By extending Odoo’s pricing engine to support variant-based tax logic, businesses can ensure accurate pricing, automated VAT handling, and scalable eCommerce operations.

If your business deals with configurable products, complex pricing rules, or multi-country VAT, the right system design can prevent serious operational issues.

If you need help with tax logic in Odoo 👉 Talk to our Odoo experts.