Having model and id in separate fields allows you to do nifty stuff like
'my_mails': fields.one2many('mail.message', 'res_id', domain=['model', '=', 'my.model'])
and joins are a lot more efficient of course, which is why they used the split approach for mail.message.
You can of course wrap model and res_id in a function field which is a reference field, but then the UI to pick the correct model is unusable (remember all the trickery I had to suffer through for fetchmail_inbox).
With this, we can simply set the model in the context or in on_change (judging from the code, that should work too)
Having model and id in separate fields allows you to do nifty stuff like one2many( 'mail.message' , 'res_id', domain=['model', '=', 'my.model'])
'my_mails': fields.
and joins are a lot more efficient of course, which is why they used the split approach for mail.message.
You can of course wrap model and res_id in a function field which is a reference field, but then the UI to pick the correct model is unusable (remember all the trickery I had to suffer through for fetchmail_inbox).
With this, we can simply set the model in the context or in on_change (judging from the code, that should work too)