[IMP] conftest: support for mapped(fn)

This commit is contained in:
Xavier Morel 2024-10-07 08:03:36 +02:00
parent 6a1b77b92c
commit 3a8b4684da

View File

@ -1425,6 +1425,9 @@ class Model:
)
def mapped(self, path):
if callable(path):
return [path(r) for r in self]
field, *rest = path.split('.', 1)
descr = self._fields[field]
if descr['type'] in ('many2one', 'one2many', 'many2many'):