In an Email Template applied to Sales Orders, I’m using object.name (<t t-out="object.name">) in the body of the email to include the order number. Is it possible to make this a link to the Sales Order so the client can click through to view it? I assume I can wrap it in an <a href=""></a> tag, but I’m not clear on how to reference the object.name in this format.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Účetnictví
- Sklad
- PoS
- Project
- MRP
This question has been flagged
Hi,
In Odoo email templates, you can mix QWeb/templating tags with HTML. Since object refers to the record (here, a sale.order), you can use its get_portal_url() method to generate the correct public link.
<a t-att-href="object.get_portal_url()">
<t t-out="object.name"/>
</a>
This will render as something like:<a href="https://yourcompany.odoo.com/my/orders/1234">SO023</a>
So the customer sees SO023 as a link, and when they click it, it opens the portal view of that sales order.
Odoo also uses like this way.
Hope it helps
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit seRelated Posts | Odpovědi | Zobrazení | Aktivita | |
---|---|---|---|---|
|
0
úno 25
|
1149 | ||
|
5
pro 23
|
22326 | ||
|
1
dub 24
|
6338 | ||
|
4
zář 22
|
6135 | ||
|
2
čvn 22
|
3270 |