Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 18.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.68 MB
Module directory on disk
Code analysis 0 migration notes 8 models 5 views 0 HTTP endpoints

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

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 5

XML IDNameModelTypeStatus
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

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • us_tax_sourcing Selection
    default='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=True string='US Tax Sourcing' args: [('destination', 'Destination (customer address)'), ('origin', 'Origin (company address)')]
Public methods (0)

No public methods.

New fields (1)
  • us_tax_sourcing Selection
    readonly=False related='company_id.us_tax_sourcing'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • us_tax_sourcing Selection
    default='destination' help="Whose address was used: the customer's (destination) or the document company's (origin)." readonly=True string='Tax Sourcing' args: [('destination', 'Destination'), ('origin', 'Origin')]
Public methods (1)
  • log_calculation(self, payload)
    @api.model
    Record whether the rated address was the company's.

New fields (0)

No new fields.

Public methods (2)
  • calculate_for_invoice(self, move)
    @api.model
    Rate the invoice with its company address when it asks for it.
  • calculate_for_sale_order(self, order)
    @api.model
    Rate the order with its company address when it asks for it.

New fields (3)
  • us_tax_based_on_company Boolean
    compute='_compute_us_tax_based_on_company' copy=True help="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=False store=True string='Tax Based on Company Address'
  • us_tax_origin_address_missing Boolean
    compute='_compute_us_tax_origin_address_missing' string='Company Address Incomplete for US Tax'
  • us_tax_origin_out_of_state Boolean
    compute='_compute_us_tax_origin_out_of_state' string='Company Address Used for Out-of-State Customer'
Public methods (0)

No public methods.