Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
1438 มุมมอง

En CRM creé un bool  x_studio_crear_oportunidad_de_seguimiento


Si está activado y una oportunidad se mueve a ganada cree una acción automatizada que crea para el mismo cliente una nueva oportunidad.

if record.x_studio_crear_oportunidad_de_seguimiento:
    new_opportunity = record.copy({
        'name': f"Seguimiento de {record.name}",
        'stage_id': 1,  # ID de la etapa inicial que desees para la nueva oportunidad
        'partner_id': record.partner_id.id,  # Asociamos la nueva oportunidad al mismo cliente
    })


me pueden ayudar

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Thanks! 

I forgot to say, that a I would like this oportunity to have a date_deadline one year from the moment i'ts created. This is something i could´t do. If any of you helps me I would be greatfull

อวตาร
ละทิ้ง

Nahuel, in that case you can map a domain conditions or you can change in code

ผู้เขียน

How could I do that y the code you gave me?

คำตอบที่ดีที่สุด

Hello Nahuel, 

For this kindly configure the automation rule like this .. 

Code :
x = env['crm.lead'].browse(record.id)

if x.x_studio_testing:

    env['crm.lead'].create({'name':'New Lead for Customer','partner_id':x.partner_id.id})

Thanks,

อวตาร
ละทิ้ง

Code may be optimized as follows:

if record.x_studio_testing:

env['crm.lead'].create({'name':'New Lead for Customer','partner_id':x.partner_id.id})

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 22
1911
1
ก.ค. 24
2823
0
ก.พ. 23
1640
1
ม.ค. 21
11174
1
ต.ค. 23
2999