Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Add dynamic url parameter in link or button in email odoo v16

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
emailurldynamicodoo16features
9 Replies
21840 Rodiniai
Portretas
LAPA Zero-Pensieri

hi how i can add dynamic data in url of link or button in an email in the marketing campaign automation? 

0
Portretas
Atmesti
LAPA Zero-Pensieri
Autorius

the placeholder {{...}} not work is converted in entities

https://www.lapa.ch/offerta-guanciale?contact_name=%7B%7Bobject.name%7D%7D&phone=%7B%7Bobject.name%7D%7D&email=%7B%7Bobject.email%7D%7D&partner_name=%7B%7Bobject.parent_id.name%7D%7D

LAPA Zero-Pensieri
Autorius

i have try to use QWeb Template like

<a t-att-href="'https://www.lapa.ch/offerta-guanciale?contact_name=' + object.name + '&email='+ object.email +'&phone='+ object.phone +'&partner_name='+ object.parner_id.name"></a>

but for some reason the email return error

if i write just "'https://www.lapa.ch/offerta-guanciale?contact_name=' + object.name + '&email='+ object.email" work if i add phone not work... im confused.

@Cybrosys Techno Solutions Pvt.Ltd have some idea?

LAPA Zero-Pensieri
Autorius

i think the QWeb Template error is for object.phone is not escaped. how can i escape this value in the html of an email?

LAPA Zero-Pensieri
Autorius

for some reason i cant add more than 2 params. 2 parms work if i send manually the email or if i send a test but not work if the campaign start

return QWEB Template error when try to send automatically

Portretas
Bhavin Patel
Best Answer

To add a dynamic URL parameter in a link or button in an email template in Odoo v16, you can use the following steps:

  1. Open the email template that you want to modify.
  2. Select the link or button that you want to add the dynamic URL parameter to.
  3. Click on the "Insert/Edit Link" or "Insert/Edit Button" button in the email editor toolbar.
  4. In the URL field, enter the base URL that you want to use for the link or button, including any static parameters.
  5. Add the dynamic URL parameter to the end of the URL, using the Odoo expression syntax "{{...}}".
  6. Inside the double curly braces, enter the name of the field or variable that you want to use as the dynamic URL parameter.
  7. Save the email template.

Here's an example of how you can add a dynamic URL parameter to a link in an email template:

Let's say you want to include a link to the customer portal for each recipient of your email. You can use the following URL as the base URL for the link:

https://yourdomain\.com/my/customers/portal/

To\ add\ a\ dynamic\ URL\ parameter\ for\ the\ customer\ ID,\ you\ can\ modify\ the\ URL\ like\ this:

https://yourdomain.com/my/customers/portal/?customer_id={{object.partner_id.id}}

In this example, we're using the Odoo expression "{{object.partner_id.id}}" to retrieve the ID of the customer associated with the email recipient. This will dynamically insert the customer ID into the URL for each recipient, so they will be directed to their own customer portal page when they click the link.

Note that the exact syntax and field names may vary depending on your specific use case, so you may need to consult the Odoo documentation or seek further assistance to ensure that your dynamic URL parameter is set up correctly.

2
Portretas
Atmesti
Emma Dimech

Hi, I am trying to follow these steps for the following:
> link to Quotion (portal view) from follow-up automated email in Marketing Automation App (Lead / Opportunity Model)
> link to Worsheet Report (portal view) from Invoice email template.
> link to Quotation (portal view) from follow-up automated email in Marketing Automation App (Sales Order Model)

I cannot seem to get the syntax right, can you provide any advice?

David Waters

I'd like to do the same but the steps mentioned here don't work. Like other answers in this thread, I also get %7B%7Bobject.partner_id.id%7D%7D as a resulting link whether I use ${ } format or {{ double brackets }} the result is the same. Has something changed in Odoo 17 that doesn't allow for this solution?

Portretas
LAPA Zero-Pensieri
Autorius Best Answer

thx, but from marketing automation email i cant go into html of the email. im miss something? 

EDIT i have found the button for go inside the html of email but when the email is send the html {{ is convertend in html entities.. how can i solve this? 


is the result 
contact_name=%7B%7Bobject.name%7D%7D&phone=%7B%7Bobject.name%7D%7D&email=%7B%7Bobject.email%7D%7D&partner_name=%7B%7Bobject.parent_id.name%7D%7D

2
Portretas
Atmesti
David Waters

I'd like to do the same and I also get %7B%7Bobject.partner_id.id%7D%7D whether I use ${ } format or {{ double brackets }} the result is the same. Has something changed in Odoo 17 that doesn't allow for this solution?

Portretas
Joe-Civ
Best Answer

@LAPA Zero, 

I'm trying to do the same thing, and here's the problem: 

There's two different types of email templates in Odoo

  1. Email marketing - these are used for mass mailings to your customer in the Email Marketing tool
  2. Mail templates - these are used for single emails for server triggered mailing (eg QWeb)

These aren't the same.  

Unfortunately, Email marketing doesn't support Jinja fields, and Mail Templates (like QWeb, don't support Jinja fields.  

Sorry, what your asking for isn't possible, even in today's Odoo online OOTB.  You would have to get a premium account with access to odoo_sh and customize it.  

0
Portretas
Atmesti
Portretas
Tom Rubino
Best Answer

simply looking for a way to link to current record via the email template. 

This doesn't seem to work either. 

<div style="margin: 16px 0px 16px 0px;" data-oe-version="1.0">

    <a t-att-href="ctx.get('https://XXXXX.odoo.com/odoo/plm/2/action-1087/{{object.id}}')" style="color: #374151; border-style: none; margin: 0px; box-sizing: border-box; border-width: 0px; background-color: #875a7b; padding: 8px 16px; text-decoration: none; border-radius: 5px; font-size: 13px;"><font style="color: #ffffff;">

        Validate my account&nbsp;</font></a>

</div>

Anyone figure out how to create a dynamic link to a record in an email template? I'm in Odoo 18...

0
Portretas
Atmesti
Portretas
Paulo Matos
Best Answer

Perhaps use a method to retrive the values you want?

In Odoo 18:

<t t-set="desired_value" t-value="object.your_method_retrieve_url()"/>

<a t-att-href='desired_value' t-out="desired_value" />

I solved my problem this way

Thanks

0
Portretas
Atmesti
Portretas
Tom Jones
Best Answer

How is an issue posted about Odoo v16 stil a problem in v17

Did anyone figure it out?

0
Portretas
Atmesti
Portretas
David Waters
Best Answer

First time User.. Can't delete this yet. I though I was commenting not answering... My bad.. 

I'd like to do the same and I also get %7B%7Bobject.partner_id.id%7D%7D whether I use ${ } format  or {{ double brackets }} the result is the same. Has something changed in Odoo 17 that doesn't allow for this solution?

0
Portretas
Atmesti
Portretas
Maduka Sopulu
Best Answer

The way to achieve this is by going to the mail template, 

highlight the word / sentence you want to link, 

Click on the link option, and paste your link with the dynamic field props like  
${object.id}

e.g

/web#id=${object.id}&action=2401&model=approval.request&view_type=form&cids=&menu_id=1160

0
Portretas
Atmesti
Portretas
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

In the email template, in 

<field name="body_html" type="html">

You can give any html content you want for the body of your email.

<div style="margin: 16px 0px 16px 0px;">
<a t-att-href="ctx.get('token_url')"
style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
Validate my account
</a>
</div>

The above mentioned code is the button you see for the email sent when validating account. In the t-att-href, you can give the dynamic value you want.

Regards

0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

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

Registracija
Related Posts Replies Rodiniai Veikla
Forwarding emails to a specific Opportunity
email opportunity odoo16features
Portretas
Portretas
1
kov. 25
3343
How can the user responsible for the task receive a personalized email?
email task dynamic
Portretas
Portretas
1
gruod. 24
1748
Odoo Summary Mail - Change from Daily to Weekly Solved
email Summary odoo16features
Portretas
Portretas
Portretas
2
liep. 24
2919
v16: generate Lead / Opportunity using emails
email leads odoo16features
Portretas
1
bal. 24
2082
configure multiple email domains to send and receive emails
email helpdesk odoo16features
Portretas
0
rugs. 24
2203
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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