[FIX] purchase_stock: `on_time_rate` in multi companies
Because of the weird behavior of the ORM regarding related field pointing to computed fields, `on_time_rate` was taking account of all companies when asking it through `purchase.order.on_time_rate` but it was single-company when asked through `res.partner.on_time_rate`. It was observed during an upgrade request issue analysis, and in that case the problem was not even the fact it was miscomputed, but the fact this computed field, computed as sudo, leaded to fill the cache for `purchase.order.line.move_ids` with `stock.move` belonging to other companies than the user one, and then when attempting to read values from these stock moves a multi-company access error was raised. upg-8106 closes odoo/odoo#66882 X-original-commit: 1b729171 Signed-off-by:Denis Ledoux (dle) <dle@odoo.com>
Loading
Please register or sign in to comment