[FIX] Remove unused field from crm for calendar. By consequence, bug with email attendee is removed.
bzr revid: jke@openerp.com-20140224104745-egf6hutwzk9gcweh
This commit is contained in:
parent
6305ac4094
commit
ad86d1afdc
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue