From e5379bc1a050883452fae1e71093467042e9b64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 11 Jun 2014 10:40:39 +0200 Subject: [IMP] project: task: added reviewer_id field, linking towards a res.users, that is the reviewer of the task. This field is automatically tracked, using a small update of the get_auto_subscribe_fields method that is weirdly implemented. --- addons/mail/mail_thread.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'addons/mail/mail_thread.py') diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 55a566880b8..dc2b98fdc93 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -1699,7 +1699,7 @@ class mail_thread(osv.AbstractModel): ], context=context) return fol_obj.unlink(cr, SUPERUSER_ID, fol_ids, context=context) - def _message_get_auto_subscribe_fields(self, cr, uid, updated_fields, auto_follow_fields=['user_id'], context=None): + def _message_get_auto_subscribe_fields(self, cr, uid, updated_fields, auto_follow_fields=None, context=None): """ Returns the list of relational fields linking to res.users that should trigger an auto subscribe. The default list checks for the fields - called 'user_id' @@ -1710,6 +1710,8 @@ class mail_thread(osv.AbstractModel): Override this method if a custom behavior is needed about fields that automatically subscribe users. """ + if auto_follow_fields is None: + auto_follow_fields = ['user_id'] user_field_lst = [] for name, column_info in self._all_columns.items(): if name in auto_follow_fields and name in updated_fields and getattr(column_info.column, 'track_visibility', False) and column_info.column._obj == 'res.users': -- cgit v1.2.3