Odoo's Mergebot a4e1b7c44e [MERGE] mail, test_mail: remove aggregation from message_format
Remove aggregation from `message_format `and `_message_read_dict_postprocess`.
There should be no functional change in this PR.

Purpose
=======

The existing code working with "tree" for aggregation and doing explicit "read"
or "search" for related fields does not seem necessary since the ORM of v13.

Considering that it adds complexity to the method, if its original purpose is
not necessary anymore, it would be better to change it.

The notable changes of the ORM that would justify this task are:
 - single cache, shared between current user and sudo (which is called a lot in
   those methods and might explain why the "tree" mechanism was put in place
   originally)
 - m2o and o2m being kept consistent with each other, which allows accessing o2m
   through fields directly (instead of having to use "search" to ensure getting
   consistent data)

Explanation
===========

Doing "read" or "search" could be counter-productive if the data are already in
cache because using those methods will lead to a query no matter what.
The ideal way is to simply access the fields through the records.

As for the "tree" and aggregation in general, the prefetch is automatically
taking care of that when iterating.

task-2180311

closes odoo/odoo#43841

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-03-09 16:04:48 +01:00
2020-02-13 11:45:39 +00:00
…
…
…
…
…

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

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%