Odoo Help

0

0
2 Answers
1
Avatar

Niyas Raphy

--Niyas Raphy--
24330
| 7 7 11
Wayanad, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123

Happy to help :)

Niyas Raphy
26-02-19 17:11

Hi,

Can you check one more thing, activate developer mode and navigate to Settings -> Technical  -> Reporting -> Reports, and search for your report and check whether the Reload from Attachment is ticked or not. If it is already ticked, just untick and try again.


Thanks

0
info@waehlbar.com
27-02-19 03:09

Hello,


thanks for the quick response. Is unticked...

My Product Label (PDF) have this QWEB report:

<?xml version="1.0"?>
<t t-name="product.report_producttemplatelabel">
    <t t-call="web.basic_layout">
        <div class="page">
            <t t-foreach="docs" t-as="template">
                <t t-foreach="template.product_variant_ids" t-as="product">
                  HALLO
                    <t t-call="product.report_simple_label">
                        <t t-set="product" t-value="product"/>
                    </t>
                </t>
            </t>
        </div>
    </t>
</t>


By the way... how can i set source-code in post?

On the QWEB report i have set a simple "Hallo" and have this result:

********* here i want to place a image but i became a forbidden 403 back by set link or image tag in ost************

Link to image: http://www.nighteagle.de/downloads/result.jpg

And yes i have set the report to HTML instead to make a PDF - only for testing and changing the layout. Later i want to make PDFs and print with a Brother QL800. It works fine with Location Barcodes and my QWEG report changes.

Back to topic... i can see the QWEB report from Product Label is call the product.report_simple_label and in the file odoo/addons/product/report/product_product_templates.xml i found:

<template id="report_simple_label">
            <div style="width: 32%; display: inline-table; height:13rem;">
                <table class="table table-bordered mb-0" style="border: 20px solid black;">
                    <tr>
                        <th class="table-active text-left" style="height: 4rem;">
                            <strong t-field="product.display_name"/>
                        </th>
                    </tr>
                    <tr>
                        <td style="height: 2rem">
                            <strong>Price:</strong>
                            <strong t-field="product.lst_price" t-options="{'widget': 'monetary', 'display_currency': product.company_id.currency_id}"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="text-center align-middle" style="height: 6rem">
                            <t t-if="product.barcode">
                                <img alt="Barcode" t-if="len(product.barcode) == 13" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', product.barcode, 600, 150)" style="width:100%;height::4rem;"/>
                                <img alt="Barcode" t-elif="len(product.barcode) == 8" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN8', product.barcode, 600, 150)" style="width:100%;height::4rem;"/>
                                <img alt="Barcode" t-else="" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', product.barcode, 600, 100)" style="width:100%;height::4rem;"/>
                                <span t-field="product.barcode"/>
                            </t>
                            <t t-else=""><span class="text-muted">No barcode available</span></t>
                        </td>
                    </tr>
                </table>
            </div>
        </template>

I can delete this file or make some changes - nothing make a difference. Reboot and refresh modules have no effect. I still have the layout from the picture above.

Hope is more clear which problem i have or what im doing totally wrong here since yesterday 7am ... :-(

Regards,

Borris


2 Comments
Niyas Raphy
27-02-19 08:40

Are you saying that the changes added in the template named report_simple_label is not affecting in system ?

info@waehlbar.com
01-03-19 09:50

Yes and No... in the QWB-REport i can write my layout and then all is okay - but little bit tricky of the buggy wkhtmltopdf in Version 12.3.1 and now i have buggy 12.5.1 but okay-- work now onyl little Error -11 limit memory blahblah.. discusses on github problem from wkhtmltopdf author.

So if we have the xml-files then any change have no effect - thats correct.

Stel een vraag
Keep Informed
1 volger(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now