Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
1281 Widoki

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

Awatar
Odrzuć

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

Autor

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

Najlepsza odpowiedź

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,

Awatar
Odrzuć

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})

Powiązane posty Odpowiedzi Widoki Czynność
0
mar 22
1804
1
lip 24
2545
0
lut 23
1513
1
sty 21
10811
1
paź 23
2880