Daily updates from Odoo
Wednesday, July 1, 2026
1 change · 19.0
Resolved issues and error corrections
This update corrects the Peru Kardex PLE stock report so balances, costs, invoices, and return movements are calculated consistently in Odoo 19. It also improves support for related stock operations and landed costs, helping reduce reporting errors and manual corrections.
Original PR description
## Summary Forward-port of PR #88592 (Kardex PLE 12.1/13.1 report fixes) adapted to 19.0's `stock.move` architecture, where `stock.valuation.layer` was removed as an independent model. - **Running…
## Summary
Forward-port of PR #88592 (Kardex PLE 12.1/13.1 report fixes) adapted to 19.0's `stock.move` architecture, where `stock.valuation.layer` was removed as an independent model.
- **Running balances**: Replace per-move `remaining_qty`/`remaining_value` with accumulated `data_per_products` dict for correct cumulative totals
- **Fix broken `_append_historic_valuation_lines()`**: The existing 19.0 code called `self.env.cr.dictfetchall()` without prior SQL execution — replaced with proper `_read_group` tuple unpacking
- **Fix `_append_valuation_line()`**: Use `_read_group` on `stock.move` (is_in/is_out aggregation) instead of `qty_available` with `to_date` which doesn't provide correct cost data
- **Fix invoice association**: Use `.sorted('id')[:1]` to consistently pick the first-created invoice, matching 18.0's SQL `ORDER BY am.id NULLS LAST` behavior
- **Return operation types**: Add `stock_picking_return.py` to assign operation types 24/25/21 for return pickings
- **MRP support**: Detect `mrp_operation` picking type and assign operation types 19/27
- **Float formatting**: Add `float_repr` with 2-decimal precision for all numeric fields
- **19.0 API adaptations**: `is_storable` filter (replaces `type='product'`), `fields_list` parameter naming, security comment on `sudo()`
Related: #88592, #106679