跳至内容
菜单
此问题已终结
2677 查看

in the HEADER of PDF report generated by QWeb,  the html Archor "<a>" can show the word "Google" but is not clickable. please advise how to make the href link work in pdf header converted from QWeb template, thanks!


Other cases I tried:

1) the same code in '<div class="page">' DIRECTLY and it works well, like the "facebook" in the example.

2) use "t-attf-href" instead of "href", not work;
3) "<a>" in class "footer", not work;


I am working on Odoo 13.


Code:

<template id="quotation_order">
    <t t-call="web.basic_layout">
        <div class="page">
            <a href="https://www.facebook.com/">facebook</a>
           <div class="header">
                <div>
                    <a href="https://www.google.com/">Google</a>
                </div>
            </div>
        </div>
    </t>
</template>


形象
丢弃

did you find an answer? I'm also having the same problem.

编写者

Hi Sakthi,

There is no ideal solution for this issue.
1) Odoo team confirmed that it is a bug in a 3rd party tool "wkhtmltopdf" and there is nothing Odoo can do right now;
2) The bug was found back in 2014 but there is still no target date in "wkhtmltopdf" to fix it. So I think we should not expect it can be fixed recently.

Two workarounds:
1) If the link is text and starts with www., like "www.abc.com", it is clickable;
2) someone found another workaround and posted it on https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1692

Unfortunately both of the workarounds do not work in my case, hope they work for you.

Thank you :)