convert object to identifier only for many2one and one2one types