-
- Downloads
[FIX] stock_account: remove order in read_group
`quantity_svl` and `value_svl` field on product_product are computed from all the stock_valuation_layers
As no `orderby` key is given, the `groupby` keys are used as orderby
ones. In this particular case, the groups are done on `product_id` so
the order is on the name of product_product. This order will add to the
read_group query 3 joins from stock_valuation_layer table.
- product_product
- product_template for the name
- ir_translation for the translation of the name
This is completely useless in the scope of a computed field to get the
sum of values and sum of quantities. As it not possible to ask
read_group to not order the result. This commit call the method with the
simplest order key possible: `id`
closes odoo/odoo#105921
Opw: 3047017
Signed-off-by:
Arnold Moyaux (arm) <arm@odoo.com>
Please register or sign in to comment