Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1124 Представления

Im currently working on auto sending sign request and this is my current code


template_id = payload.get('template_id')
partner_id = payload.get('partner_id')
role_id = 1  # Assuming role_id as 1 by default
mail_order = 1
subject = payload.get('subject')
filename = payload.get('filename')

# Ensure the template exist
template = env['sign.template'].browse(template_id)

if template.exists():

    sign_request = env['sign.request'].create({
        'template_id': template.id, 
        'reference': filename,
    })
   
    # Send the sign request email
    sign_request.send_request()


This is being triggered via webhook. In other side where it trigger this using webhook, the odoo seems to return 'ok', but the email is not being sent.


I already check my email system and its working so I suspect the problem is in this side (i dont even know what email it will be sent).


 There something wrong with this code. How can I fix it?

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
февр. 22
4565
1
апр. 25
4051
2
мая 16
10686
0
нояб. 24
1287
4
авг. 24
8474