Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3265 Tampilan

The following topic explains what the track property does. 

But how can I override or modify _track properties:

class crm_lead(format_address, osv.osv):
    """ CRM Lead Case """
    
    _track = {
        'stage_id': {
            # this is only an heuristics; depending on your particular stage configuration it may not match all 'new' stages
            'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj.probability == 0 and obj.stage_id and obj.stage_id.sequence <= 1,
            'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: (obj.stage_id and obj.stage_id.sequence > 1) and obj.probability < 100,
            'crm.mt_lead_won': lambda self, cr, uid, obj, ctx=None: obj.probability == 100 and obj.stage_id and obj.stage_id.fold,
            'crm.mt_lead_lost': lambda self, cr, uid, obj, ctx=None: obj.probability == 0 and obj.stage_id and obj.stage_id.fold and obj.stage_id.sequence > 1,
        },
    }

I would like to avoid the message that is logged each time a lead/opportunity changes fase...

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Mei 24
1744
0
Jun 23
2796
0
Nov 21
1462
0
Nov 16
4387
0
Mar 15
3693