Siirry sisältöön
Odoo Menu
  • Kirjaudu sisään
  • Kokeile ilmaiseksi
  • Sovellukset
    Talous
    • Kirjanpito
    • Laskutus
    • Kulut
    • Datataulukot (BI)
    • Asiakirjat
    • Allekirjoita
    Myynti
    • CRM
    • Myynti
    • Kassajärjestelmä myymälään
    • Kassajärjestelmä ravintolaan
    • Tilaukset
    • Vuokraus
    Verkkosivut
    • Verkkosivun Rakennustyökalu
    • Verkkokauppa
    • Blogi
    • Foorumi
    • Livechat
    • Verkko-oppiminen
    Toimitusketju
    • Varastointi
    • Tuotanto
    • Tuotteen elinkaaren hallinta (PLM)
    • Ostot
    • Huolto
    • Laatu
    Henkilöstöhallinto
    • Työntekijät
    • Rekrytointi
    • Vapaat
    • Arvioinnit
    • Suositukset
    • Kuljetuskalusto
    Markkinointi
    • Somemarkkinointi
    • Sähköpostimarkkinointi
    • Tekstiviestimarkkinointi
    • Tapahtumat
    • Markkinoinnin automaatio
    • Kyselyt
    Palvelut
    • Projekti
    • Työaikakirjaukset
    • Kenttähuolto
    • Asiakaspalvelu
    • Suunnittelu
    • Ajanvaraukset
    Tuottavuus
    • Viestintä
    • Hyväksynnät
    • IoT
    • IP-puhe
    • Tietokirjasto
    • WhatsApp
    Kolmannen osapuolen sovellukset Odoo-Studio Odoo-Pilvialusta
  • Toimialat
    Vähittäiskauppa
    • Kirjakauppa
    • Vaatekauppa
    • Huonekaluliike
    • Ruokakauppa
    • Laitteistokauppa
    • Lelukauppa
    Ruoka & Majoitus
    • Baari ja Pubi
    • Ravintola
    • Pikaruoka
    • Majatalo
    • Juomien jakelija
    • Hotelli
    Kiinteistöt
    • Kiinteistönvälitystoimisto
    • Arkkitehtitoimisto
    • Rakentaminen
    • Kiinteistönhallinta
    • Puutarhanhoito
    • Kiinteistön omistajien yhdistys
    Konsultointi
    • Tilitoimisto
    • Odoo-kumppani
    • Markkinointitoimisto
    • Lakitoimisto
    • Osaajahankinta
    • Tilintarkastus & sertifiointi
    Tuotanto
    • Tekstiili
    • Metalli
    • Huonekalut
    • Ruoka
    • Panimo
    • Yrityslahjat
    Terveys & Liikunta
    • Urheiluseura
    • Silmälasiliike
    • Kuntokeskus
    • Hyvinvointialan ammattilaiset
    • Apteekki
    • Kampaamo
    Kaupat
    • Yleismies
    • IT-laitteisto & Tuki
    • Aurinkoenergiajärjestelmät
    • Suutari
    • Siivoustarvikkeet
    • LVI-palvelut
    Muut
    • Voittoa tavoittelematon järjestö
    • Ympäristötoimisto
    • Mainostaulujen vuokraus  
    • Valokuvaus
    • Leasing-pyörät
    • Ohjelmistojen jälleenmyyjä
    Selaa kaikkia toimialoja
  • Yhteisö
    Opi
    • Tutoriaalit
    • Dokumentaatio
    • Todistukset
    • Koulutus
    • Blogi
    • Podcast
    Kannusta kouluttautumaan
    • Koulutusohjelmat
    • Scale Up! Liiketoimintapeli
    • Vieraile Odoolla
    Hanki ohjelmisto
    • Lataa
    • Vertaile versioita
    • Julkaisut
    Tee yhteistyötä
    • Github
    • Foorumi
    • Tapahtumat
    • Käännökset
    • Ryhdy kumppaniksi
    • Kumppanipalvelut
    • Rekisteröi tilitoimistosi
    Hanki palveluja
    • Löydä kumppani
    • Löydä kirjanpitäjä
    • Varaa asiantuntijatapaaminen
    • Implementaatiopalvelut
    • Asiakasreferenssit
    • Tuki
    • Versionkorotukset
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Varaa demo
  • Hinnoittelu
  • Asiakaspalvelu

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

  • CRM
  • e-Commerce
  • Kirjanpito
  • Varastointi
  • PoS
  • Projekti
  • MRP
All apps
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Apua

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

Tilaa

Saat ilmoituksen, kun tähän viestiin ilmaantuu aktiviteettia

Tämä kysymys on merkitty
emailurldynamicodoo16features
9 Vastaukset
21758 Näkymät
Avatar
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
Avatar
Hylkää
LAPA Zero-Pensieri
Tekijä

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
Tekijä

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
Tekijä

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
Tekijä

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

Avatar
Bhavin Patel
Paras vastaus

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
Avatar
Hylkää
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?

Avatar
LAPA Zero-Pensieri
Tekijä Paras vastaus

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
Avatar
Hylkää
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?

Avatar
Joe-Civ
Paras vastaus

@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
Avatar
Hylkää
Avatar
Tom Rubino
Paras vastaus

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
Avatar
Hylkää
Avatar
Paulo Matos
Paras vastaus

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
Avatar
Hylkää
Avatar
Tom Jones
Paras vastaus

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

Did anyone figure it out?

0
Avatar
Hylkää
Avatar
David Waters
Paras vastaus

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
Avatar
Hylkää
Avatar
Maduka Sopulu
Paras vastaus

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
Avatar
Hylkää
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Paras vastaus

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
Avatar
Hylkää
Nautitko keskustelusta? Älä vain lue, vaan osallistu!

Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!

Rekisteröidy
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
Forwarding emails to a specific Opportunity
email opportunity odoo16features
Avatar
Avatar
1
maalisk. 25
3330
How can the user responsible for the task receive a personalized email?
email task dynamic
Avatar
Avatar
1
jouluk. 24
1736
Odoo Summary Mail - Change from Daily to Weekly Ratkaistu
email Summary odoo16features
Avatar
Avatar
Avatar
2
heinäk. 24
2862
v16: generate Lead / Opportunity using emails
email leads odoo16features
Avatar
1
huhtik. 24
2053
configure multiple email domains to send and receive emails
email helpdesk odoo16features
Avatar
0
syysk. 24
2169
Yhteisö
  • Tutoriaalit
  • Dokumentaatio
  • Foorumi
Avoin lähdekoodi
  • Lataa
  • Github
  • Runbot
  • Käännökset
Palvelut
  • Odoo.sh hosting
  • Tuki
  • Versionkorotus
  • Räätälöidyt kehitykset
  • Koulutus
  • Löydä kirjanpitäjä
  • Löydä kumppani
  • Ryhdy kumppaniksi
Meistä
  • Yrityksemme
  • Tavaramerkki
  • Ota yhteyttä
  • Työpaikat
  • Tapahtumat
  • Podcast
  • Blogi
  • Asiakkaat
  • Oikeudellinen ilmoitus • Yksityisyys
  • Tietoturva
الْعَرَبيّة 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 on kokoelma avoimen lähdekoodin yrityssovelluksia, jotka kattavat kaikki yrityksesi tarpeet: asiakkuudenhallinta eli CRM, verkkokauppa, kirjanpito, varastointi, kassajärjestelmä, projektinhallinta, jne.

Odoon uniikki arvolupaus on olla samanaikaisesti erittäin helppokäyttöinen ja täysin integroitu.

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