Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Can't send Signature Request (error: You must specify one signer for each role of your sign template)

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
errorsignaturerequestautomation
2 Respuestas
3318 Vistas
Avatar
Johnny Solas

I'm currently working on a automation and this is my code


First the automation will be triggered via webhook and will receive this

template_id = int(payload.get('template_id'))
partner_id = int(payload.get('partner_id'))


Then it will create 2 records in sign.item model so client can input their signature and date of signing

item_signature = {
    "template_id" : template_id,
    "type_id": 1, # 1 = signature item
    "required" : True,
    "responsible_id" : 1, # 1 = customer role
    "page": 9,
    "posX": 0.344,
    "posY": 0.156,
    "width" : 0.189,
    "height" : 0.024,
    "name": "Signature"
}

env['sign.item'].create(item_signature)

item_sign_date = {
    "template_id" : template_id,
    "type_id": 12, # 12 = date item
    "required" : True,
    "responsible_id" : 1, # 1 = customer role
    "page": 9,
    "posX": 0.302,
    "posY": 0.228,
    "width" : 0.150,
    "height" : 0.015,
    "name" : "Date"
}

env['sign.item'].create(item_sign_date)


Now I wanted to send a sign request to client by creating a record in sign.send.request

send_request_data = {
    "template_id": template_id,
    "subject": "Test Subject",
    "filename": "test.pdf",
}
   
send_request = env["sign.send.request"].create(send_request_data)


Then i have to add a record in model sign.send.request.signer in which i can append it to the "send_request" above

signer_data = [{
    "role_id": 1,  # 1 = customer role
    "partner_id": partner_id,
    "sign_send_request_id": send_request.id
}]

signer = env["sign.send.request.signer"].create(signer_data)


To send the request i have to run this

send_request.send_request()


But odoo will throw an error to me everytime 

"odoo.exceptions.ValidationError: You must specify one signer for each role of your sign template"


I don't understand why I'm getting this error. I have already ensure the the signature item and date item will be filled by customer. Then I have added a signer with role of "customer". 


When I check in sign module, a record was actually create, but the signer was set to "Public User" even though it should not.


Please help me know the reason why I'm getting this error and possible solutions. Thanks in advance

0
Avatar
Descartar
Avatar
Johnny Solas
Autor Mejor respuesta

I solve the issue by adding something in here

 send_request_data = {
        "template_id": template_id,
        "subject": "Test Subject",
        "filename": "test.pdf",
        "signers_count": 1,
        "signer_id": partner_id # add this line, tells odoo this sign request is for this contact
    }


send_request = env["sign.send.request"].create(send_request_data)


So after creating a record in model sign.send.request continue adding a record for model sign.send.request.signer. Then add this line


send_request.write({
        "signer_ids" : [signer_id.id]
})


This will tell odoo that the sign request about to be sent should be sent to this people.

0
Avatar
Descartar
Yatrik Chauhan

Hello Johnny Solas,
I was searching for a solution as well, and I’m glad to see you’ve already found one. This will definitely be helpful.
Thanks!

Avatar
Yatrik Chauhan
Mejor respuesta

Hello Johnny Solas,

You can try the following code:

# Create signature item
item_signature = {
    "template_id": 1,
    "type_id": 1,  # 1 = signature item
    "required": True,
    "responsible_id": 1,  # 1 = customer role
    "page": 9,
    "posX": 0.344,
    "posY": 0.156,
    "width": 0.189,
    "height": 0.024,
    "name": "Signature"
}

env['sign.item'].sudo().create(item_signature)

# Create date item
item_sign_date = {
    "template_id": 1,
    "type_id": 12,  # 12 = date item
    "required": True,
    "responsible_id": 1,  # 1 = customer role
    "page": 9,
    "posX": 0.302,
    "posY": 0.228,
    "width": 0.150,
    "height": 0.015,
    "name": "Date"
}

env['sign.item'].sudo().create(item_sign_date)

# Create the sign send request
send_request_data = {
    "template_id": 1,
    "subject": "Test Subject",
    "filename": "test.pdf",
    "signers_count": 1,
}

send_request = env["sign.send.request"].create(send_request_data)

# Create signer
signer_data = [{
    "role_id": 1,  # Assuming this is the required role ID
    "partner_id": 3,
    "mail_sent_order": 1,
    "sign_send_request_id": send_request.id
}]

env["sign.send.request.signer"].create(signer_data)

# Send the request
send_request.send_request()

Make sure to replace template_id, partner_id, and role_id with values from your payload. This should work without any errors. Let me know if you face any issues.

Thanks!

0
Avatar
Descartar
Johnny Solas
Autor

Thank you for your help!

I tried this code, the error "You must specify one signer for each role of your sign template" is now gone. However there are new issues.

1. Whenever I tried to open the document generated by "send_request.send_request()". It shows this error message

"UncaughtClientError > TypeError Uncaught Javascript Error > Cannot set properties of undefined (setting '106') Occured on yourcompany.com on 2025-02-10 11:08:16 GMT

TypeError: Cannot set properties of undefined (setting '106')
at PDFIframe.getSignItems (https://yourcompany.com/web/assets/280e2ad/web.assets_web_dark.min.js:22716:82)
at PDFIframe.start (https://yourcompany.com/web/assets/280e2ad/web.assets_web_dark.min.js:22682:29)
at PDFIframe.waitForPagesToLoad (https://yourcompany.com/web/assets/280e2ad/web.assets_web_dark.min.js:22681:85)
at https://yourcompany.com/web/assets/280e2ad/web.assets_web_dark.min.js:22681:119
"

2. It used the wrong template. I tried changing the template_id in the payload, but it still use the same wrong template. I also suspect that this the same issue, is the reason why the Signature and Date item was not added in the template.

I would appreciate your guidance on resolving these issues!

Johnny Solas
Autor

I restart my odoo and then Issue #2 was gone, but #1 is still their

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
How can I only notify people to sign a Document when it is their turn?
signature request
Avatar
Avatar
1
abr 23
3253
Add Request Sign Feature in a Custom Module
signature request custom module
Avatar
0
feb 25
1892
Can't Send Sign Request thru email
email signature send automation
Avatar
0
feb 25
1751
CSS Sign module not working
error signature css v17
Avatar
0
sept 24
1342
Send signature request - add a template text to the email
document email signature template request
Avatar
0
oct 25
2404
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now