'Check map on recordsets.'

@mute_logger('odoo.models')
def test_80_map(self):

    ps = self.env['res.partner'].search([])
    parents = ps.browse()
    for p in ps:
        parents |= p.parent_id
    self.assertEqual(ps.mapped((lambda p: p.parent_id)), parents)
    self.assertEqual(ps.mapped('parent_id'), parents)
    self.assertEqual(ps.mapped((lambda p: p.parent_id.name)), [p.parent_id.name for p in ps])
    self.assertEqual(ps.mapped('parent_id.name'), [p.name for p in parents])
    self.assertEqual(ps.mapped(''), ps)
