Skip to Content
Menu
This question has been flagged
1 Reply
6275 Views

Hello,

I have an issue with Odoo Qweb; i willl concatenate a string with odoo model object value.

 e.g "<a href='link1/product?id='+product_template.id>Artist's songs 1</a>" ???

Thanks for all

Avatar
Discard
Best Answer

Hi legland,

I believe you're trying to build custom URL's in QWeb with the ID of the record? You can encode variables in ${} in order to get them parsed to the value of the field. For example:

<a href="/link1/${object.product_template.id}">
<!-- This will print out the name of the product --> <span t-esc="object.product_template.name"/> </a>

Regards,
Yenthe

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 24
118
4
May 24
4871
1
Apr 24
971
7
Sep 24
22454
1
Mar 24
277