[FIX] base: correct typo in _fields_find, res_ids -> res_id

The issue is introduced by revision
d465346f1e

Raphaël actually meant
`res_ids = data.mapped('res_id')`

Indeed, there is no `res_ids` field on `ir.model.data`,
but there is a `res_id`.

In addition, the same code is written correctly in the method
just above this one, `_object_find`

opw-704592
This commit is contained in:
Denis Ledoux
2017-01-13 11:54:22 +01:00
parent 9aaed65352
commit 2ddd5590b2
@@ -19,7 +19,7 @@ class IrModelReferenceReport(models.AbstractModel):
fname_wildcard = 'field_' + model.replace('.', '_') + '_%'
data = Data.search([('model', '=', 'ir.model.fields'), ('module', '=', module.name), ('name', 'like', fname_wildcard)])
if data:
res_ids = data.mapped('res_ids')
res_ids = data.mapped('res_id')
fnames = self.env['ir.model.fields'].browse(res_ids).mapped('name')
return sorted(self.env[model].fields_get(fnames).iteritems())
return []