odoo/odoo#159122

Created by Sales, Victor Feyens (vfe)
label
odoo-dev:16.0-wsale-tax-broll-vfe
head
b6dfb7f7f85c9e3531cd78650f8fa7cb2fe91b86
target
16.0
merged
2 months ago by Accounting, Laurent Smet (las)
forward-ports

[FIX] website_sale: harmonize tax computation

Standard `sale` tax flows rely on `_get_tax_included_price_unit`,
whereas part of `website_sale` flows do, while another part relies
on `_fix_tax_included_price_company`, which doesn't handle some
advanced cases (fiscal position mapping of price_included taxes).

This commit drops the use of `_fix_tax_included_price_company` in
website_sale, to only use the newest API of `_get_tax_included_price_unit`,
supposed to handle more cases.

Also makes all taxes computation go through a single entry point,
`_apply_taxes_to_price`, already used for `combination_info` logic (/shop/product),
but not in `_get_sales_prices` (/shop page).

opw-3700803

Fixes #155162

---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr