[FIX] orm: _compute_related: ensure prefetch is done in batch
authorOlivier Dony <odo@openerp.com>
Wed, 6 Aug 2014 16:48:35 +0000 (18:48 +0200)
committerOlivier Dony <odo@openerp.com>
Wed, 6 Aug 2014 16:48:35 +0000 (18:48 +0200)
commitf062eec6398e59f8636b00ef922be48a0f69c772
tree77196831ec6b9a6456af5107f139e4304c401f97
parent135962184d68e278ee564502d079cb3235035015
[FIX] orm: _compute_related: ensure prefetch is done in batch

Due to the use of a sudo env, the records
were being added to the sudo cache one by
one instead of all at once. This meant the
prefetching was not able to load all
records at once, leading to prohibitive
times when processing thousands of
records.
openerp/fields.py