[FIX] "prefetching" removing even the records specifically asked for
16d6744
turns out to not be great, because it filters out the todos for
prefetched fields (rather than those just for the field being asked) there are
situations where it ends up not fetching the records it was originally asked
for and breaks a bunch of stuff e.g. unreconcile line in bank statements
Force the ids explicitly asked for back in the fetched set, so that the
prefetch is at most a noop, rco will have to take an actual look at it.
This commit is contained in:
parent
fd0c52550a
commit
b1f1596aef
|
@ -3182,7 +3182,7 @@ class BaseModel(object):
|
|||
for field in (self._fields[name] for name in field_names):
|
||||
prefetch.update(self._in_cache_without(field).ids)
|
||||
todo.update(self.env.todo.get(field, empty).ids)
|
||||
records = self.browse(prefetch - todo)
|
||||
records = self.browse(prefetch - todo | set(self.ids))
|
||||
|
||||
result = []
|
||||
for sub_ids in cr.split_for_in_conditions(records.ids):
|
||||
|
|
Loading…
Reference in New Issue