US Sales Tax Engine - Origin Sourcing
l10n_us_sales_tax_engine_origin_sourcing · OCA/l10n-usa
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Description
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.
Every calculation log records whether the customer's or the company's address was rated.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 5
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_us_tax |
res.config.settings.us.tax.origin.sourcing | res.config.settings | Inherits l10n_us_sales_tax_engine.res_config_settings_view_us_tax | |
view_account_move_us_tax |
account.move.us.tax.origin.sourcing.form | account.move | form | Inherits l10n_us_sales_tax_engine.view_account_move_us_tax |
view_sale_order_us_tax |
sale.order.us.tax.origin.sourcing.form | sale.order | form | Inherits l10n_us_sales_tax_engine.view_sale_order_us_tax |
view_us_tax_log_form |
us.tax.calculation.log.origin.sourcing.form | us.tax.calculation.log | form | Inherits l10n_us_sales_tax_engine.view_us_tax_log_form |
view_us_tax_log_list |
us.tax.calculation.log.origin.sourcing.list | us.tax.calculation.log | list | Inherits l10n_us_sales_tax_engine.view_us_tax_log_list |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 8
No new fields.
Public methods (0)No public methods.
-
us_tax_sourcingSelectiondefault='destination'help="Address used by default to rate the US sales tax of new sales orders and customer invoices. Destination: the customer's delivery address. Origin: the company address, except for customers outside the United States. It can be changed on each draft document."required=Truestring='US Tax Sourcing' args: [('destination', 'Destination (customer address)'), ('origin', 'Origin (company address)')]
No public methods.
-
us_tax_sourcingSelectionreadonly=Falserelated='company_id.us_tax_sourcing'
No public methods.
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
-
us_tax_sourcingSelectiondefault='destination'help="Whose address was used: the customer's (destination) or the document company's (origin)."readonly=Truestring='Tax Sourcing' args: [('destination', 'Destination'), ('origin', 'Origin')]
-
log_calculation(self, payload)@api.modelRecord whether the rated address was the company's.
No new fields.
Public methods (2)-
calculate_for_invoice(self, move)@api.modelRate the invoice with its company address when it asks for it. -
calculate_for_sale_order(self, order)@api.modelRate the order with its company address when it asks for it.
-
us_tax_based_on_companyBooleancompute='_compute_us_tax_based_on_company'copy=Truehelp="Rate US sales tax with the address of the document's company instead of the customer's delivery address. Checked by default when the company uses origin sourcing and the delivery address is in the company's state or has no state."readonly=Falsestore=Truestring='Tax Based on Company Address' -
us_tax_origin_address_missingBooleancompute='_compute_us_tax_origin_address_missing'string='Company Address Incomplete for US Tax' -
us_tax_origin_out_of_stateBooleancompute='_compute_us_tax_origin_out_of_state'string='Company Address Used for Out-of-State Customer'
No public methods.