Saturday, March 23, 2024
1 change · 17.0
Resolved issues and error corrections
This fix corrects an error in shipping cost calculations when using weight multiplied by volume as the pricing variable. Previously, shipping costs were incorrectly inflating with the square of order quantities because both weight and volume were being multiplied by quantity separately before being multiplied together. The fix ensures accurate pricing by introducing the weight*volume variable at the correct point in the calculation process.
Original PR description
Before this commit, when using a shipping method with the variable weight*volume for price computation, the price was growing with the square of the ordered quantities. This is because both volume and weight were multiplied by the quantity, before being multiplied with each other in the next step. This commit fixes the issue by introducing the variable weight*volume at the beginning of the computation. In order not to break anything in stable, the new variable is added as a kwarg to the useful methods. OPW-3802315 Forward-Port-Of: odoo/odoo#158899 Forward-Port-Of: odoo/odoo#158767