Monday, July 13, 2026
1 change · 18.0
Resolved issues and error corrections
The POS Avatax integration now calculates taxes for normal in-store sales without requiring a customer, using the company location as the sale location. It also preserves the exact tax amounts returned by Avatax so customers are charged correctly, especially when external tax calculations differ from Odoo's internal estimates.
Original PR description
This module has never worked in a stable release. It was broken two days after it was merged by the removal of replaceDataByKey [1]. On top of that, the module behaves in an unexpected way: - Tax is…
This module has never worked in a stable release. It was broken two days after it was merged by the removal of replaceDataByKey [1]. On top of that, the module behaves in an unexpected way: - Tax is based on a customer's home address, - To calculate tax a customer must be selected, - Tax is calculated as if shipped from the warehouse selected on pos_warehouse_id This could be useful in very obscure scenarios (B2B sales, traveling salesmen), but for those cases customers can already use our Avatax integration on sale orders. We want this module to be useful for normal B2C POS sales. Taxes they charge are the same regardless of where the customer may live. This commit makes many changes: - Stop requiring a customer to be selected, - Always calculate local sales (from company location to company location) if the Avatax option is enabled on pos.config, - Fix a bug where price_subtotal is not multiplied by quantity, - Removes copy/pasted code from sale.order that serves no purpose, This makes the module useful for companies that don't want to manually figure out what taxes to charge. This could be especially useful for companies with many shops in different locations. The module also doesn't handle the biggest challenge regarding external taxes: tax amounts Odoo calculates are not guaranteed to be the same as the ones returned by Avatax. There have been many fixes regarding this in other modules [2]. The summary of the situation is that the tax percentage returned by external tax calculators is only informational, and will not always be the "actual" tax percentage charged. Only the $ amount is authoritative. Differences can occur due to rounding, or due to automatically applied (partial) exemptions. The added test simulates this by deliberately misconfiguring a tax percentage amount. Before this fix the POS would charge the wrong amounts in the above case. This commit adds a hacky mechanism that "freezes" tax amounts returned by Avatax and displays them as-is, bypassing the machinery that calculates taxes in JS. When a line is modified the amounts are unfrozen. Note that in the case described above (Odoo taxes != Avatax taxes) the session closing entry won't be balanced. In this case the session must be force-closed with `pos.close.session.wizard`. It's not possible to fix this like we do for `l10n_br_edi_pos`, because we don't store the amounts per tax. A tour test was added to make sure the module keeps working. [1] https://github.com/odoo/odoo/commit/3e94fe90ded58d498f0098cd9ed8679cbe500b8f [2] d941074434a0, a9783b107df2, b65308d67584 task-4676595