Daily updates from Odoo
Saturday, April 27, 2024
1 change
Resolved issues and error corrections
This fix resolves a critical error that occurred when printing delivery guide reports for Chilean shipments with no demand quantity. The system was attempting to divide by zero when calculating unit prices. The fix now uses the completed quantity instead of demand quantity for price calculations, ensuring reports can be generated successfully even when products are added manually to deliveries.
Original PR description
**Steps to reproduce:** - Install Sales and l10n_cl_edi_stock - Switch to a Chilean company (e.g. CL Company) - Create a SO: * Customer: [a Chilean customer] (e.g. Blanco Martin & Asociados EIRL) *…
**Steps to reproduce:** - Install Sales and l10n_cl_edi_stock - Switch to a Chilean company (e.g. CL Company) - Create a SO: * Customer: [a Chilean customer] (e.g. Blanco Martin & Asociados EIRL) * Product: [any storable product with quantity on hand] - Confirm the invoice - Go to the delivery - In "Detailed Operations" tab, add a product with "Done" set to 1 - Save the delivery => In "Operations" tab, "Demand" of the added product should be 0 - Do not validate the delivery - Click on "Print > Delivery Guide SII DTE 52 (CL)" **Issue:** A traceback is raised due to a division by 0. **Cause:** The Total price of a product line is computed from its "Demand" quantity. It's also the case for the price unit that is computed with this formula: `(Total price / Demand quantity)` where Demand quantity is 0 in this case. **Solution:** The computation can be made from "Done" quantity. opw-3873020 Forward-Port-Of: odoo/enterprise#61612 Forward-Port-Of: odoo/enterprise#61377