[FIX] fields: make convert_to_cache() more robust with inverse one2many

When a one2many field uses an integer field as inverse, the onchange method on
the second model may receive a dictionary for the value of the integer field.
This is because the client expects that field to be a many2one.