diff options
| author | Wolfgang Taferner <wtaferner@users.noreply.github.com> | 2019-08-23 06:29:38 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2019-11-04 08:11:51 +0000 |
| commit | 5ac04570f12924c6da274031734c36b182e207ee (patch) | |
| tree | a050eae37958c9d52e62788bcf7ae4665f52237a /doc/reference/javascript_reference.rst | |
| parent | 34e7e53ea9ec6505b21238db46b191f5ec36c291 (diff) | |
[ADD] base: allow importing new O2M values with an xid
When importing an O2M value (sub-record), rather than raising an error
if the value has a xid set (foo_ids/id) and the xid does not exist in
the database, re-insert the xid as the "id" field of the sub-record,
then re-extract it at creation (the ORM will have ignored it) and
associate it with the newly created record.
Advantages:
* keeps o2m creation in the proper order during import (sub-records
remain created after the parent) meaning o2ms with a required parent
can take advantage of the feature
* avoids breaking batching when creating the objects
* no new command or smuggling through an existing command
closes odoo/odoo#35995
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions
