How to get the xml id of a record?
Not sure if _get_external_ids() should be called because it's a protected method, but this is a way to fetch the xml id for a record. Beware ... it doesn't mean an xml id exists for the record, so first check for existence before assuming there is a first value in the returned list ([0]).
model_id.record_id._get_external_ids().get(model_id.record_id.id)[0]