Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita 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
  • Proyectos
  • 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
3317 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.

Registrarse
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
1890
Can't Send Sign Request thru email
email signature send automation
Avatar
0
feb 25
1750
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
2403
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • 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 estar 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