Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3271 Visualizações

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
mai. 24
1744
0
jun. 23
2797
0
nov. 21
1462
0
nov. 16
4388
0
mar. 15
3693