7c7f927befa5f3d080f765147a98bb04df1333e2
When using account.root (through account.account().root_id or account.move.line().account_root_id) in read_group, we can have inconsistent results because of how account.root is defined. account_root is a view with the id field computed out of account codes, but there can be the same account for several companies, so we can have several same ID for different rows => this is not expected by the ORM who expects one record by ID => in result, we get for example the values in the pivot table of journal items be multiplied by the number of companies if we group by "Account Root". With this changeset, we add a small optimisation in ORM so if a group by is ordered by a many2one, if the order of the many2one is "id" we don't add a left join for ordering. note: without the change, the added tests failed: - in account, with 1000 as balance, and 2 as number of root with id=90090 - in test_read_group with a query containing a left join to o2m table - in test_new_api with a query containing a left join to o2m table opw-2282699 opw-2289440 opw-3288390 closes odoo/odoo#143257 X-original-commit: 674bdd1ac2cf9a4a3748b85f71ebbd01137485ce Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%