product_get_price_helper
Adds a helper on product variants to compute prices with pricelist, fiscal position, company, and date details, returning amounts with tax and discount info.
Key Features
- product.product: Adds an _get_price helper returning a price dictionary with value, tax inclusion flag, original_value, and discount for a product variant.
- product.product: Computes unit price using the provided quantity, pricelist, company, fiscal position, and date contexts so pricing respects those parameters.
- product.product: Adjusts prices for tax inclusion or exclusion through fiscal position tax mappings while indicating whether taxes are included in the returned value.
- product.product: When pricelists display discounts, calculates the original list price and discount percentage with proper rounding and handles zero-priced items safely.
- technical: Uses custom float rounding to avoid floating-point representation artifacts in computed prices and discounts.