Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Add Payment Link to Sales Order Quotation

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
salestemplatespaymentssales.orderodoo16features
2 Răspunsuri
4204 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Great Fermentations
Autor

Unfortunately, no.

Imagine profil
Jainesh Shah(Aktiv Software)
Cel mai bun răspuns

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
Imagine profil
Abandonează
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.

Imagine profil
David Schaeffer
Cel mai bun răspuns

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

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Duplicate section on Sales order Rezolvat
sales sale.order.line sales.order v14 odoo16features
Imagine profil
Imagine profil
2
mar. 25
3656
How to display changes to Delivered Quantities in Sales Orders in Chatter Rezolvat
sales sales.order
Imagine profil
Imagine profil
1
mar. 25
2390
Sales stay in "To Invoice" despite already being paid.
sales sales.order
Imagine profil
Imagine profil
1
mai 24
2626
Change or creat Sales Order date
sales.order odoo16features
Imagine profil
1
dec. 23
2417
Multiple Address in sale orde Rezolvat
sales odoo16features
Imagine profil
Imagine profil
Imagine profil
2
mar. 24
3357
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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