From ad86d1afdc168562637dfa19e309745f8b5b0dc2 Mon Sep 17 00:00:00 2001 From: Kersten Jeremy Date: Mon, 24 Feb 2014 11:47:45 +0100 Subject: [PATCH] [FIX] Remove unused field from crm for calendar. By consequence, bug with email attendee is removed. bzr revid: jke@openerp.com-20140224104745-egf6hutwzk9gcweh --- addons/crm/calendar_event.py | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/addons/crm/calendar_event.py b/addons/crm/calendar_event.py index df50d99b72b..4f57e364282 100644 --- a/addons/crm/calendar_event.py +++ b/addons/crm/calendar_event.py @@ -48,31 +48,11 @@ class calendar_attendee(osv.osv): _inherit = 'calendar.attendee' _description = 'Calendar Attendee' - def _compute_data(self, cr, uid, ids, name, arg, context=None): - """ - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of compute data’s IDs - @param context: A standard dictionary for contextual values - """ - name = name[0] - result = super(calendar_attendee, self)._compute_data(cr, uid, ids, name, arg, context=context) - - for attdata in self.browse(cr, uid, ids, context=context): - id = attdata.id - result[id] = {} - if name == 'categ_id': - if attdata.ref and 'categ_id' in attdata.ref._columns: - result[id][name] = (attdata.ref.categ_id.id, attdata.ref.categ_id.name,) - else: - result[id][name] = False - return result + def _noop(self, cr, uid, ids, name, arg, context=None): + return dict.fromkeys(ids,False) _columns = { - 'categ_id': fields.function(_compute_data, \ - string='Event Type', type="many2one", \ - relation="crm.case.categ", multi='categ_id'), + 'categ_id': fields.function(_noop, string='Event Type', deprecated="Unused Field - TODO : Remove it in trunk", type="many2one", relation="crm.case.categ"), } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: