← Back to team overview

openerp-community-reviewer team mailing list archive

Re: [Merge] lp:~ajite/web-addons/7.0-web-addons-add-0001 into lp:web-addons

 

Review: Approve code review

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)
-- 
https://code.launchpad.net/~ajite/web-addons/7.0-web-addons-add-0001/+merge/210620
Your team Web-Addons Core Editors is subscribed to branch lp:web-addons.


References