Skip to main content
Odoo Community Association

US Sales Tax Engine - Origin Sourcing

Alpha License: LGPL-3 OCA/l10n-usa Translate me on Weblate Try me on Runboat

This module extends the US Sales Tax Engine (l10n_us_sales_tax_engine) so that sales can be rated with the address of the company or branch that sells instead of the customer’s address.

Each company chooses whether new sales orders and customer invoices are rated, by default, with the customer’s delivery address (destination) or with the company address (origin). Each draft document keeps its own Tax Based on Company Address check, so a company can mix in-store pickups and shipped orders. This covers intrastate sales in origin-based states and in-store sales in any state.

A company that keeps destination sourcing can still rate with its own address the documents of customers that have no address, which the engine alone leaves without tax.

Every calculation log records whether the customer’s or the company’s address was rated.

Table of contents

Use Cases / Context

The US Sales Tax Engine (l10n_us_sales_tax_engine) always rates the tax with an address of the customer. That is right for a company that ships to its customers, but not for every sale:

  • In origin-based states, a sale made inside the state is taxed at the rate of the seller’s location, not the customer’s.

  • In any state, a sale picked up at the store is taxed where the store is, even if the customer lives in another state.

Both cases need the address of the selling company instead of the customer’s.

This module keeps the engine’s calculation and only changes which address it rates. It does not hold a list of origin-based states: each company chooses its default sourcing and each document can override it. With origin sourcing, a document starts rated with the company address only when the delivery address is in the company’s state or has none; a shipment to another state starts with the customer address, and an in-store pickup by an out-of-state customer is checked by hand. The origin address is the company address, not the one of a warehouse.

It works for a single company and for each branch of a company tree, since every branch has its own address and its own sourcing setting. A company that keeps destination sourcing is rated exactly as with the engine alone.

Configuration

To configure this module, you need to:

  1. Select, in the company switcher, the company or branch to configure: the setting is stored per company.

  2. Go to Settings > Invoicing > US Sales Tax Engine. The Tax Sourcing setting is only shown when Enable US Sales Tax Engine is checked.

  3. Choose the Tax Sourcing of the company:

    • Destination (customer address), the default: new documents are rated with the customer’s delivery address, as with the engine alone.

    • Origin (company address): new sales orders and customer invoices are rated with the company address when the customer is in the company’s state. The company needs a 5-digit ZIP, a state and United States as country; otherwise the setting cannot be saved, and that address cannot be left incomplete afterwards, neither on the company nor on its contact. The whole rate comes from the company address: see the roadmap for states with mixed sourcing, such as California.

  4. With Destination, optionally check Customers Without Address: new sales orders and customer invoices whose customer has no ZIP are rated with the company address, instead of not being rated at all. It needs the same complete company address as Origin.

  5. Save.

Tax Sourcing setting

Changing the setting only affects documents created afterwards. Existing documents keep the check they already have; the ones that exist when the module is installed start with the check off, so their rating does not change.

With origin sourcing, the nexus that matters is the one in the state of the company address, since that is the address being rated.

Usage

To use this module, you need to:

  1. Create a sales order or a customer invoice. The Tax Based on Company Address check comes:

    • checked when the company uses Origin sourcing and the customer’s delivery address is in the company’s state, or has no state and no country other than the United States;

    • checked too when the company uses Destination sourcing with Customers Without Address, and the delivery address has no ZIP and nothing locates the customer elsewhere: a state, a country or a foreign postal code on the customer, on its company or on the delivery or invoice address of the document is enough to leave it unchecked;

    • unchecked when the delivery address is in another state or another country, and otherwise whenever the company uses Destination sourcing.

  2. Leave the check on to rate the tax with the address of the document’s company or branch. Check it by hand for an in-store pickup by an out-of-state customer. Uncheck it to rate with the customer’s address: on the sales order, Tax Based on Shipping Address shows again and chooses between the customer’s delivery and invoice addresses; customer invoices always use the delivery address.

  3. Click Calculate US Tax, or confirm the order. With the check on, the rate is the one of the company ZIP and the tax is named after the company’s state (US Sales Tax <state> <rate>%).

The check can be changed while the order is a quotation (sent or not) and while the invoice is in draft. It is recomputed when the company, the customer or the delivery address of the document changes, and on sales orders also when the invoice address changes. Changing the company setting, or the state or country of a customer, does not change existing documents.

When the check is on and the delivery address is in a different state from the company’s, the draft order or invoice shows a warning. It does not block anything: uncheck Tax Based on Company Address to rate with the delivery address instead.

Quotation rated with the company address

Invoices:

  • An invoice created from a sales order takes the order’s check. Orders with a different value are never grouped in the same invoice.

  • A credit note keeps the check of its invoice.

  • Posting a customer invoice rates it again with its own check.

Draft customer invoice rated with the company address

Special cases:

  • Customer outside the United States: no US tax, as with the engine alone, even if the check is on.

  • Customer without an address (counter sale): rated with the company address when the check is on. With Customers Without Address the check comes on by itself. A customer with no address at all who is really in another state is rated with the company address too, since nothing on the record says otherwise: filter the calculation logs by Tax Sourcing = Origin to list the documents rated this way and complete those customers. Completing the address later does not change existing documents: uncheck Tax Based on Company Address on the draft ones.

  • Company without a complete US address (5-digit ZIP, state and United States as country) on a document with the check on: the draft document shows a warning and the customer’s address is used.

In Invoicing > Configuration > US Sales Tax > Audit > Calculation Logs, the Tax Sourcing column, also shown in the Address group of each log, tells whether the rated address was the customer’s (Destination) or the company’s (Origin). The address fields of the log show the address actually rated.

Calculation logs with the Tax Sourcing column

Known issues / Roadmap

  • Mixed sourcing is not supported: the whole rate comes from a single address. States such as California, which rate the state, county and city share at the seller’s location and the district taxes at the customer’s, are rated entirely with the company address when origin sourcing is used.

  • Supporting it needs the engine to resolve one address per jurisdiction level, a natural follow-up of an address hook in the engine.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Binhex

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainers:

edescalona crrodrigueztrujillo

This module is part of the OCA/l10n-usa project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Metadata

Release files for odoo-addon-l10n-us-sales-tax-engine-origin-sourcing 18.0.1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-l10n-us-sales-tax-engine-origin-sourcing 18.0.1.1.0
File Interpreter ABI Platform Actions
odoo_addon_l10n_us_sales_tax_engine_origin_sourcing-18.0.1.1.0-py3-none-any.whl Python 3 none any Details for odoo_addon_l10n_us_sales_tax_engine_origin_sourcing-18.0.1.1.0-py3-none-any.whl

Release files / odoo_addon_l10n_us_sales_tax_engine_origin_sourcing-18.0.1.1.0-py3-none-any.whl

Download URL odoo_addon_l10n_us_sales_tax_engine_origin_sourcing-18.0.1.1.0-py3-none-any.whl
Size 621.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bea620e3457729b7c629cfd6cfc969b7f21b00373ed64facc508fc3ff41fb1e
BLAKE2b-256 checksum
How to use checksums
d8bc4c3a81ada21749ec870eb91f6e5259a7f9dfc09feb9266669fd700f5c94a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for odoo-addon-l10n-us-sales-tax-engine-origin-sourcing 18.0.1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page