You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update_record_from_xml has an optional argument (ensure_references) that
will recursively update all refs referred to by the record.
However, at the moment, its implementation doesn't keep good track of
which refs already have been updated, leading to far more updates than
necessary.
For example, if we have the following tree of references:
```
Record A
- Record B
- Record C
- Record B
- Record D
- Record E
- Record F
- Record B
- Record C
- Record D
- Record E
```
(which is quite common since lots of records end up referring to some
objects such as `base.main_company`, `base.group_user`,
`base.user_root`, `base.group_system`, etc.)
we will end up calling update_record_from_xml 11 times whereas we only
need to call it 6 times (one for each of Records A-F).
That's a lot of extra SQL queries.
Part of odoo/upgrade#5236
Signed-off-by: Christophe Simonis (chs) <[email protected]>
0 commit comments