Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
8 ตอบกลับ
22214 มุมมอง

I am working on Odoo 12. When I generate a report on html is shown correctly:


But if I try to generate it on PDF, barcodes are not shown:

Looking for a solution I tried to change the System Parameter "report.url" to http://127.0.0.1:8069:

This warning is shown when I generate the report:
    WARNING odoo_toroco odoo.addons.base.models.ir_actions_report: wkhtmltopdf: b'Exit with code 1 due to network error: ProtocolUnknownError\n'

What am I doing wrong?
I appreciate any help. Thanks.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Finally I solved my problem. Basically I did 3 things to solve it:

  • Update WKHTMLTOPDF:

    • I had version 0.12.1 so I updated to version 0.12.5

  • A new System parameter:

    • I added another System Parameter:

      • Key: web.base.url.freeze

      • Value: True

  • Change my report definition:

<template id="report_foo_view">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="objs">
<div class="page">
    <!--REPORT CODE...-->
</div>
</t>
</t>
</template>
To
<template id="report_foo_view">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="objs">
<div class="page">
    <!--REPORT CODE...-->
</div>
</t>
</t>
</template>

I hope this could be usefull for someone.

อวตาร
ละทิ้ง

Thanks for your post solved my issue which was slightly different.

I received the following error: wkhtmltopdf: b'Exit with code 1 due to network error: ConnectionRefusedError\n'

I added both the web.base.url.freeze = True and report.url param http://127.0.0.1:8069 and that solved my issue.

thanks for me it was t t-call="web.basic_layout"

I believe the report.url parameter is one of the key pieces to solving the problem. On a virtual server it also required using the internal IP, not the external IP. Similar to what Ian shows here in his comment.

Thanks Ian, the report.url pamater solve my problem

คำตอบที่ดีที่สุด
These two parameters resolve my problem.
report.url: LocalOdoo URL on the server
web.base.url.freeze: True

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Wow!! Thanks Michell.

I have take your recomendation and i solved my issue.  Only change this line:  <t t-call="web.basic_layout"> and that's all.

Regards.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Same problem here we only use the param 

report.url: localhosturl:port

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

thanks... same issue. 

for me only 2 steps... i didnt use the ...freeze

thanks.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Thank you 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I have same problem 14.0

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I have a slightly different problems. It is with the logos in the header of two reports that are generated by an schedulled action that  generate two reports, attach them to an email and send it. It used to work perfectly in Odoo8. After migrating to Odoo12 it does not.

The error is the following:

odoo.addons.base.models.ir_actions_report: wkhtmltopdf: 'Exit with code 1 due to network error: ContentNotFoundError'
When I click on Run Manually most reports are  generated with the logos but there are few that come out with no logos.
อวตาร
ละทิ้ง

I faced the same issue,but got resolved when i used db filter in local

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 15
5118
1
ส.ค. 25
352
1
เม.ย. 25
1503
1
ก.ย. 24
2192
1
ก.ค. 24
1944