Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
2546 Lượt xem

Hello everyone, for a few days I have been having this problem that I can't figure out where it comes from when to date, it always worked correctly for me.
The thing is that when I ask to generate the invoice in pdf, it doesn't show me the company data or the footer.
I have tried to modify the company data, change the invoice template, send it by email or print to pdf. The result is the same and the truth is that I am very blocked and lost.
Thanks to anyone who can help me on this issue.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thanks for the answers, the fact is that it does generate the pdf, but not with the data that does appear in the preview, it is as if in the invoice, it could not take the data that does appear in the configuration and is seen in the preview pdf.
And now, have this:

OwlError: Invalid prop suffix


Ảnh đại diện
Huỷ bỏ
Tác giả

As of today, the error is escalating upwards, it starts to worry me because I am not able to repair it even if I have installed odoo from scratch and recovering some of the backup copies, both in copy and move mode:
OwlError: Invalid prop suffix
at CodeGenerator.formatProp (http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1750:12)
at http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1752:68
at Array.map (<anonymous>)
at CodeGenerator.formatPropObject (http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1752:50)
at CodeGenerator.compileComponent (http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1755:113)
at CodeGenerator.compileAST (http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1648:558)
at CodeGenerator.compileTDomNode (http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1683:368)
at CodeGenerator.compileAST (http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1648:140)
at CodeGenerator.compileTIfBranch (http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1699:101)
at CodeGenerator.compileTIf (http://sinzg.local:8069/web/assets/706-a2ad239/web.assets_common.min.js:1703:59)

Câu trả lời hay nhất

Hey,

There can be an issue of wkhtmltopdf version you should match it with the appropriate version's requirement.txt version.
Also you can check one more thing first : the report.url should be set to http://localhost:8069.


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Try like following

You can add a template for the company details and call that from your report template

<template id="report_session">
            <t t-call="report.html_container">
                <t t-foreach="docs" t-as="doc">
                    <t t-call="report.external_layout">
                    </t>
                </t>
            </t>
</template>

In reports/views/layouts.xml:

<template id="external_layout">
    <!-- Multicompany -->
    <t t-if="o and 'company_id' in o">
 <t t-set="company" t-value="o.company_id"></t>
    </t>
    <t t-if="not o or not 'company_id' in o">
        <t t-set="company" t-value="res_company"></t>
    </t>


    <t t-call="report.external_layout_header" />
    <t t-raw="0" />
<t t-call="report.external_layout_footer" />
</template>


Regards

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 25
1259
2
thg 7 25
1496
1
thg 7 25
2537
3
thg 4 25
2462
3
thg 4 25
3466