[IMP] fields: improve code in former commit
This commit is contained in:
parent
b05cf32b8f
commit
603bde1b1b
|
@ -832,10 +832,13 @@ class Field(object):
|
||||||
computed = target.browse(env.computed[field])
|
computed = target.browse(env.computed[field])
|
||||||
if path == 'id':
|
if path == 'id':
|
||||||
target = records - computed
|
target = records - computed
|
||||||
|
elif path:
|
||||||
|
target = (target.browse(env.cache[field]) - computed).filtered(
|
||||||
|
lambda rec: rec._mapped_cache(path) & records
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
target = target.browse(env.cache[field]) - computed
|
target = target.browse(env.cache[field]) - computed
|
||||||
if path:
|
|
||||||
target = target.filtered(lambda rec: rec._mapped_cache(path) & records)
|
|
||||||
if target:
|
if target:
|
||||||
spec.append((field, target._ids))
|
spec.append((field, target._ids))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue