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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
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
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
feb 25
|
1146 | ||
|
5
dic 23
|
22316 | ||
|
1
abr 24
|
6336 | ||
|
4
sept 22
|
6131 | ||
|
2
jun 22
|
3268 |