[16.0][ADD] account_avatax_oca_line_grouping #560
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@BinhexTeam
This PR adds a new addon: account_avatax_oca_line_grouping.
Some US jurisdictions (e.g. Florida, Rule 12A-15.004) allow or require that multiple items sold together as a single sale / working unit are taxed on the total invoice amount, with discretionary surtax caps applied globally instead of line by line.
The standard account_avatax_oca connector always sends one AvaTax line per Odoo line, which makes it difficult to align with these “single sale / working unit” rules while keeping AvaTax as the tax engine.
This addon introduces an optional, company-level setting “Group document lines for AvaTax” that:
Aggregates all lines of a Sales Order / Customer Invoice into a single AvaTax line when calling AvaTax.
Lets AvaTax compute tax on the total while Odoo still keeps the standard multi-line document.
Preserves the existing behaviour when the option is disabled (full backward compatibility).
This is particularly useful for industries (construction, materials, project-based sales) where the whole invoice must be treated as a single taxable unit.