Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3259 Lượt xem

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...

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 5 24
1739
0
thg 6 23
2788
0
thg 11 21
1459
0
thg 11 16
4382
0
thg 3 15
3690