Daily updates from Odoo
Saturday, March 23, 2024
2 changes · 17.0
Resolved issues and error corrections
This fix corrects how withholding taxes are calculated on Colombian electronic invoices. Previously, the system used an inaccurate workaround that could cause invoices to be rejected by tax authorities. The update improves the calculation method to directly compute the VAT amount subject to withholding, ensuring accurate tax reporting and reducing document rejection issues.
Original PR description
### Context In Colombia, a withholding tax is applied to the VAT, calculated as a percentage of the VAT amount. A typical scenario involves a VAT at 19% and a withholding tax at 15% of the VAT's 19%.…
### Context In Colombia, a withholding tax is applied to the VAT, calculated as a percentage of the VAT amount. A typical scenario involves a VAT at 19% and a withholding tax at 15% of the VAT's 19%. The existing system constraints prevent directly using the value of one tax as the base for another, leading to a workaround by setting it to -2.85 (representing 15% of 19%). ### Problem The electronic invoice requirements mandate the submission of base amounts and taxed values for each tax and invoice line. Due to our system's limitation in directly calculating the base for the withholding tax, our approach has been to reverse calculate the base using the tax amount divided by its rate. This method introduces inaccuracies because the tax amount is rounded, and those inaccuracies can in turn result in the electronic document being rejected. ### Solution There's currently no way to properly fix this, so we have to rely on some dodgy programming. This commit changes the calculation method to focus on directly determining and computing the VAT amount subject to withholding. opw-3744872 Forward-Port-Of: odoo/enterprise#58894 Forward-Port-Of: odoo/enterprise#58377
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