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

Add Payment Link to Sales Order Quotation

Suscribirse

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

Se marcó esta pregunta
salestemplatespaymentssales.orderodoo16features
2 Respuestas
4238 Vistas
Avatar
Great Fermentations

Version: Odoo 16 running on SH


Is there a way to dynamically add the sales order payment link to an email template for sending to customers? I know that we can get the payment link manually from the sales order via Action >> Generate Payment Link >> Copy, but I'm hoping there's a way to add this to an email template so my sales reps don't have to copy and paste this value every time. I've gotten close to figuring this out, but am hung up on the access_token parameter in the URL. Here's my code so far:

https://mydomain\.odoo\.com/payment/pay\?reference=\{\{object\.name\}\}\&amount=\{\{object\.amount_total\}\}\&access_token=\{\{object\.access_token\}\}\&sale_order_id=\{\{object.id}}&provider_id=14">Payment Link

The access_token being returned from object.access_token is different than the access token parameter found in the link when I copy it from the Generate Payment Link popup. It seems like this used to be available in earlier versions of Odoo, so I'm hoping it is possible v16.


Thanks!

0
Avatar
Descartar
Great Fermentations
Autor

Unfortunately, no.

Avatar
Jainesh Shah(Aktiv Software)
Mejor respuesta

Hello, @Great Fermentations,


Hope you are doing well,

Please find code in comment. 

Hope this answer helps you.

Thanks & Regards,
Email: odoo@aktivsoftware.com     

Skype: kalpeshmaheshwari

1
Avatar
Descartar
Jainesh Shah(Aktiv Software)

Please find code here :-
For add the payment link into email you need to write the code like below:

<t t-set="base_url" t-value="object.get_base_url()"/>
<a t-attf-href="#{base_url}/payment/pay?reference=#{object.name}&amp;amount=#{object.amount_total}&amp;access_token=#{object.access_token}"> Payment Link </a>

Great Fermentations
Autor

@Jainesh - Thanks, but that's already what I've tried more or less. The problem is object.access_token. That value is different from the access token in the payment link (sales order >> action >> generate payment link)

The access token generated by that action seems to be in the account_move model and not sale_order, thus object.access_token won't work.

Jainesh Shah(Aktiv Software)

Hello, @Great Fermentations,

Hope you are doing well,

When the "Generate Payment Link" button is clicked, a popup (payment_link_wizard) appears.
This popup generates an access token based on sale order data, not the account move.
We are using object.access_token because the wizard uses sale order data, not account move data.

The provided link in the question is missing some parameters between the objects.
Due to these missing parameters, accessing the specific link is not possible

I suggest use the given link to access a specific URL.

Great Fermentations
Autor

I may be wrong about the model, but the access_token value is still different. When I call the object.access_token variable from a sales order email template, it pulls in the value used for the Customer Preview page, not the Payment link page. Quick example here from my environment below. Notice the different values for access_token:

Payment Link: https://<website url>/payment/pay?reference=S00054&amount=94.05&access_token=921190550da5307816d20b643188f8dea5bd0206002acafd1c71abd50c5ffb5a&sale_order_id=54

Customer Preview Link: https://<website url>/my/orders/54?access_token=e7cda3ad-1f32-477e-9bd6-73aa52d530da

My whole reason for going at it this way was to control which payment method is available to the customer. I run two websites with two different payment providers. The default customer preview page shows all the payment providers available, and not the ones associated with a given website. The payment link page gives me the ability to define exactly which one I want to show.

Avatar
David Schaeffer
Mejor respuesta

Hi, great fermentations. Did code provided by Jainesh work? 

0
Avatar
Descartar
¿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
Duplicate section on Sales order Resuelto
sales sale.order.line sales.order v14 odoo16features
Avatar
Avatar
2
mar 25
3706
How to display changes to Delivered Quantities in Sales Orders in Chatter Resuelto
sales sales.order
Avatar
Avatar
1
mar 25
2444
Sales stay in "To Invoice" despite already being paid.
sales sales.order
Avatar
Avatar
1
may 24
2665
Change or creat Sales Order date
sales.order odoo16features
Avatar
1
dic 23
2483
Multiple Address in sale orde Resuelto
sales odoo16features
Avatar
Avatar
Avatar
2
mar 24
3378
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