Technical
Odoo Fiscal Positions: Exports, Inter-State Sales and Tax Exemptions
How to use Odoo fiscal positions to swap taxes and income accounts for exports, intra-state vs inter-state sales and tax-exempt customers, and how Odoo picks one automatically from the customer's country, state or ZIP.
Kalvyai Engineering · · 8 min read

On this page
A fiscal position is a set of substitution rules. When it applies to a sales order, invoice, purchase order or vendor bill, Odoo replaces the default taxes and accounts on each line with the ones you mapped. Products keep one default tax, and the fiscal position adjusts it for the customer.
This post covers four common cases:
- Exports that should be zero-rated and booked to a separate income account
- Intra-state vs inter-state sales (the Indian GST case, which needs two fiscal positions)
- Tax-exempt customers
- Getting Odoo to pick the right fiscal position automatically by country, state or ZIP
Field names and behaviour below match Odoo 16 and 17. Newer versions have changed parts of how tax mappings are stored, so check against your version before you script anything.
What a fiscal position contains
Each fiscal position has three parts.
- Tax mapping. Pairs of "Tax on Product" and "Tax to Apply". If a line carries the source tax, Odoo swaps in the destination tax.
- Account mapping. Pairs of source and destination accounts. Use it when, for example, export revenue must go to a different income account.
- Detection rules. The "Detect Automatically" checkbox, plus country, country group, federal states, ZIP range and "VAT required". These decide when Odoo applies the position without anyone choosing it.
Some mapping rules to know:
- One source tax can map to several destination taxes. Add two lines with the same source.
- A mapping line with a source tax and no destination tax removes that tax. This is how you make a customer tax-exempt.
- Taxes with no mapping line pass through unchanged.
You'll find fiscal positions under Accounting > Configuration > Fiscal Positions. Many localization packages ship their own fiscal positions, so look at what already exists before you create duplicates. For India, check which fiscal positions the Indian localization (l10n_in) has already created.
How Odoo chooses a fiscal position
If your auto-detection setup is wrong, the wrong taxes will land on invoices. So it helps to know the order Odoo follows. In Odoo 16/17 the logic in account.fiscal.position._get_fiscal_position works like this:
- Manual setting on the contact wins. If the delivery contact or the customer has a fiscal position set on their record, Odoo uses it and stops.
- The delivery address drives detection. On a sales order with a separate delivery address, Odoo matches country, state and ZIP from that address, not the invoice address.
- VAT required. Positions marked "VAT required" only match customers that have a tax ID. Positions without it act as the fallback.
- More specific matches win. Among positions with "Detect Automatically" on, Odoo tries country + state + ZIP first, then drops state, then ZIP, then tries country groups, then positions with no country at all.
- Sequence breaks ties. Within the same level, the position with the lower sequence (the one higher in the list) wins.
The fallback in point 4 matters. A position with "Detect Automatically" on and no country catches every customer who matched nothing more specific. That is useful for exports.
Case 1: Exports
Say you are an Indian company. Domestic sales carry GST, export invoices are zero-rated, and export revenue goes to its own income account.
- Create the export tax if your chart of accounts doesn't already have it. Ask your tax advisor which export tax to use and whether exports go under LUT/bond or with IGST paid.
- Create an income account for export sales, for example "Export Sales".
- Create a fiscal position named "Export".
- On the Tax Mapping tab, map each domestic sales tax to the export tax. For example, "GST 18%" maps to "Export 0%" and "GST 5%" maps to "Export 0%".
- On the Account Mapping tab, map "Product Sales" to "Export Sales".
- Turn on "Detect Automatically". Leave country empty and give it a high sequence so it only applies when nothing domestic matches.
Any customer with a delivery address outside India now falls through to "Export". If you sell to specific regions under different rules, use a country group instead of the empty-country fallback.
Map the purchase side too if you import. Vendor bills from foreign suppliers often need different taxes, such as reverse charge or import duties. It's usually cleaner to keep a separate fiscal position for foreign vendors than to mix sales and purchase mappings in one.
Case 2: Intra-state vs inter-state sales
Under Indian GST, a sale within your own state carries CGST + SGST. A sale to another state carries IGST at the combined rate. The usual Odoo setup is:
- Products carry the intra-state tax, often a group tax such as "GST 18%" that contains CGST 9% and SGST 9%.
- A fiscal position swaps that group for "IGST 18%" when the customer is in another state.
A common mistake is to create only the inter-state position with country = India and no state. Because of the fallback rules above, intra-state customers also match it and get IGST. You need two positions:
Fiscal position | Country | Federal states | Tax mapping | Sequence |
|---|---|---|---|---|
Intra-State | India | Your company's state (e.g. Karnataka) | None | 10 |
Inter-State | India | Empty | GST 18% → IGST 18%, GST 5% → IGST 5%, etc. | 20 |
Export | Empty | Empty | GST x% → Export 0% | 90 |
The Intra-State position has no mapping lines. It exists so that a state-level match wins before the country-level Inter-State position is considered.
If your company has GST registrations in several states, each registration is usually a separate Odoo company, and each needs its own Intra-State position set to its own state. Fiscal positions have a company field, so keep them scoped.
Whether place of supply should follow the delivery address or the billing address depends on the transaction type. Odoo detects from the delivery address. Confirm place-of-supply rules for your transaction types with your tax advisor.
Case 3: Tax-exempt customers
Exempt customers are usually specific organisations, not a region. Examples include customers holding an exemption certificate, some government or SEZ units, and resellers buying for resale in jurisdictions that allow it. So you assign the position manually rather than detecting it.
- Create a fiscal position named "Tax Exempt".
- Add a mapping line for each sales tax with Tax to Apply left empty. That removes the tax.
- If you report exempt sales separately, either map to a 0% "Exempt" tax instead of leaving it empty, or add an account mapping to an "Exempt Sales" account. Leaving the destination empty removes the tax completely, so nothing about that line appears in tax reports.
- Leave "Detect Automatically" off.
- Open the customer and set the fiscal position on the contact. It is usually on the Sales & Purchase tab.
Because a manual setting on the contact beats auto-detection, this customer gets the exempt position wherever they are. Store the exemption certificate as an attachment on the contact, and note its expiry date somewhere your team will see it.
Price-included taxes
If your product prices include tax and a fiscal position maps that tax to one that doesn't include it (or removes it), Odoo adjusts the unit price on the line so the tax amount isn't left baked into the price. The exact behaviour depends on how the source and destination taxes are configured. Test one order per case before go-live and compare the line price to what you expect to invoice.
Scripting fiscal positions
For several companies or a staging setup, creating positions by script is faster and repeatable. Here is an odoo shell example for the Odoo 16/17 data model. Check model and field names on your version, because newer releases changed how tax mappings are stored. Replace the tax names with the ones in your chart of accounts.
# Run inside: odoo shell -d your_db
company = env.company
india = env.ref('base.in')
home_state = env['res.country.state'].search(
[('code', '=', 'KA'), ('country_id', '=', india.id)], limit=1)
Tax = env['account.tax'].with_company(company)
def sale_tax(name):
tax = Tax.search([
('name', '=', name),
('type_tax_use', '=', 'sale'),
('company_id', '=', company.id),
], limit=1)
if not tax:
raise ValueError(f'Tax not found: {name}')
return tax
Fpos = env['account.fiscal.position']
Fpos.create({
'name': 'Intra-State',
'company_id': company.id,
'auto_apply': True,
'country_id': india.id,
'state_ids': [(6, 0, home_state.ids)],
'sequence': 10,
})
Fpos.create({
'name': 'Inter-State',
'company_id': company.id,
'auto_apply': True,
'country_id': india.id,
'sequence': 20,
'tax_ids': [
(0, 0, {'tax_src_id': sale_tax('GST 18%').id,
'tax_dest_id': sale_tax('IGST 18%').id}),
(0, 0, {'tax_src_id': sale_tax('GST 5%').id,
'tax_dest_id': sale_tax('IGST 5%').id}),
],
})
env.cr.commit()To check which position a given customer will get, without creating an order:
partner = env['res.partner'].browse(42) # use a real partner id
fpos = env['account.fiscal.position'].with_company(env.company)._get_fiscal_position(partner)
print(partner.display_name, '->', fpos.display_name or 'No fiscal position')
product = env['product.product'].browse(7)
print(fpos.map_tax(product.taxes_id).mapped('name'))_get_fiscal_position is an internal method and its signature has changed between versions. Older releases used get_fiscal_position(partner_id, delivery_id), and map_tax once took extra arguments. Confirm the signatures on your version before you rely on them.
Test before go-live
Run through this list in a staging database:
- A customer in your own state: expect CGST + SGST.
- A customer in another state: expect IGST at the same total rate.
- A customer in your state with a delivery address in another state: confirm the result matches your place-of-supply rules.
- A foreign customer: expect the export tax and the export income account on the journal entry.
- An exempt customer: expect no tax (or 0% exempt tax) wherever they are located.
- A customer with no country or state on their address: see what Odoo picks. Often this is the empty-country fallback, which may be wrong. Make address fields required in your process.
- A sales order where you change the customer after adding lines: confirm the taxes updated.
- Tax reports for the period: confirm each test invoice lands in the right report lines.
Common mistakes
- Only creating Inter-State. Intra-state customers fall back to it. Add the state-specific Intra-State position.
- Missing mappings for some rates. Each source tax needs its own line. A 12% product with no mapping keeps its domestic tax on an export invoice.
- Mixing sale and purchase taxes. Map sales taxes to sales taxes and purchase taxes to purchase taxes.
- Fiscal position on the wrong contact. Detection reads the delivery contact first. A manual setting on a child delivery address overrides the parent company.
- Positions not scoped to a company. In multi-company databases, an unscoped position can match in a company where its taxes don't belong.
Once purchase-side mappings for IGST and CGST/SGST are correct, input tax credit checks get simpler. Our GSTR-2B Purchase Reconciliation app compares GSTR-2B with your Odoo purchase register for ITC reconciliation.
How Kalvyai can help
We configure and extend Odoo for companies selling across states and borders. That includes fiscal positions, tax and account mappings, multi-company GST setups, and test scripts that confirm every customer type lands on the right taxes before go-live. If your invoices are picking up the wrong taxes, or you are adding export or multi-state sales, get in touch. Our ready-made Odoo and ERPNext apps are at store.kalvyai.com.
- Odoo
- Fiscal Positions
- Accounting
- GST
- Taxes
- ERP Configuration
Kalvyai Engineering · Engineering team
The engineers who build, connect and fix business systems at Kalvyai: Odoo, ERPNext, Shopify and AI agents that work inside them with approvals, budgets and an audit trail.



Comments
No comments yet. Questions and corrections are welcome.
Rate this post or leave a comment