From 3d0ca849b86c7787e4911e62c335bc8d95c12990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 16 Mar 2012 17:38:25 +0100 Subject: [PATCH] [FIX] mail.thread: added _fields_id='res_id' in args: allow to manually defined the _fields_id relationship of a one2many column; for this function field this is not a standard arg, but is passed as optional args. This allows to fix an issue with share module, trying to go through one2many relationships when trying to establish shared user rights. bzr revid: tde@openerp.com-20120316163825-acbbv1ztnk0zmy3w --- addons/mail/mail_thread.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index c6ac11731cd..8aaed056559 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -73,7 +73,8 @@ class mail_thread(osv.osv): # OpenSocial: message_ids_social is a dummy field that should not be used _columns = { 'message_ids_social': fields.function(_get_message_ids, method=True, - type='one2many', obj='mail.message', string='Temp messages'), + type='one2many', obj='mail.message', string='Temp messages', + _fields_id = 'res_id'), } #------------------------------------------------------