Skip to content
Snippets Groups Projects
user avatar
William Henrotin authored
`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: default avatarArnold Moyaux (arm) <arm@odoo.com>
aa0fb325
History

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials