콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
1441 화면

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

관련 게시물 답글 화면 활동
0
3월 22
1911
1
7월 24
2829
0
2월 23
1640
1
1월 21
11175
1
10월 23
3000