تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2487 أدوات العرض

Using this code below I can make a pressable link in the report, although only in the body part:

<!-- This link is pressable on main report body -->
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />
<t
t-set="pressable_link_1" t-value="doc.generate_pressable_links(text='text', pressable_text='pressable_text')" />
<span
t-raw="pressable_link_1"/>

<!-- This link is not pressable in header -->
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />
<t
t-set="pressable_link_1" t-value="doc.generate_pressable_links(text='text', pressable_text='pressable_text')" />
<span
t-raw="pressable_link_1"/>

It shows the url in different colour, but the link isnt pressible on header.
Any ideas?

Using odoo14 community


الصورة الرمزية
إهمال

I have the same issue, please advise how to make href link work in pdf header converted from QWeb template, thanks!

code:

<template id="quotation_order">

<t t-call="web.basic_layout">

<div class="page">

<div class="header">

<div>

<a href="https://www.google.com/">Google</a>

</div>

</div>

</div>

</t>

</template>

أفضل إجابة

The only way I got the url link to work in the PDF Output was to make the text inside the link the same as the href.

So this doesn't work

<a href="https://www.google.com/"> Google</a> 

But this will
<a href="https://www.google.com/">https://www.google.com/</a>

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 22
3538
0
أبريل 21
5310
1
سبتمبر 23
3167
0
نوفمبر 23
2225
1
يناير 23
2668