Hello,
i'm looking about 12h to configure the layout of the Product Label Printing. Changes in Reports (Developer Mode ON) is working for Stock Labels but change some reports from product label have no effect.
After looking for the XML-Files for Templates we found under addons/products/reports files like product_product_templates.xml which have exact the layout-code we see after printing Product Label on odoo12 Frontend (PDF and HTML Version). Some changes here have also no effect. We can remove this files and restart server and rerender all modules --- no effect. The layout by printing Product Label is every time the same. We think there is some cache or copies from the files.
What we doing wrong here? Some help will be nice --- we have do hundreds of tests and we have not the abbility to bring some changes in effect on the product-label.
Hope tomorrow is a better day...
Regards,
Borris
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
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
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&value=%s&width=%s&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&value=%s&width=%s&height=%s'
% ('EAN8', product.barcode, 600, 150)"
style="width:100%;height::4rem;"/>
<img alt="Barcode" t-else=""
t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&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
Are you saying that the changes added in the template named report_simple_label is not affecting in system ?
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.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Jun 22
|
1683 | ||
|
1
May 21
|
6744 | ||
|
0
Jan 21
|
2789 | ||
|
0
Nov 19
|
4869 | ||
|
5
Aug 16
|
5664 |