Raphael Collet 76f699ca0b [IMP] base: batch creation of custom related fields
Before this commit, trying to create a field related to another field in
the same batch raises an error, because the computation of the field
'related_field_id' cannot find the target field in the registry.

The new approach consists in getting the target field from the database
instead.  It works when creating fields in batch, because all records
are inserted into the database before the field is computated.

This costs extra queries, but it allows to batch field creation and
avoids multiple calls to setup_models() when creating a model with
partner field in Studio. (see odoo/enterprise#21746)

The creation of a simple custom related field (related="x.y") costs 3
additional queries to determine the target field:
 - 2 queries to get a given field on a given model
 - 1 query to get the first field's comodel

Part-of: odoo/odoo#78514
2021-10-22 17:34:18 +00:00
2021-10-21 19:09:48 +00:00
2021-10-21 19:09:48 +00:00
…
…
…
…
2021-10-21 19:09:48 +00:00
2021-10-07 17:59:53 +00:00
2021-10-21 19:09:48 +00:00
2021-10-21 19:09:48 +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%