製品ラベルをPDFに生成しようとしていますが、生成されていますが製品バーコードがありません。Odoo v10でPDFレポートを生成する際にバーコードが表示されない
しかし、私は同じQwebを使って製品ラベルをHTMLに生成しても問題ありません。
製品に移動し、2を選択: HTML(作業ファイン)として製品ラベル生成
:として製品ラベルを生成
をPDF(不足しているバーコード):
これは私のQWEBです:
<?xml version="1.0"?>
<t t-name="product.report_productlabel">
<t t-call="report.html_container">
<div class="page">
<style>
</style>
<t t-foreach="docs" t-as="template">
<t t-foreach="template.product_variant_ids" t-as="product">
<div class="col-xs-6" style="padding:0;">
<table style="border-spacing:0;margin-bottom:0;height: 110px;border: 2px solid black;" class="table">
<thead>
<tr style="width: 3in;">
<td style="width: 2.63in;text-align: center;background-color: #fff;" colspan="2" class="col-xs-8 danger">
<strong style="text-transform: uppercase;">
<t t-esc="product.name"/>
</strong>
</td>
</tr>
</thead>
<tbody>
<tr style="width: 1in;">
<td style="text-align: center; border-top: 0px solid #fff; padding: 0px 5px 0px 5px;" class="col-xs-5">
<h4 style="border: 4px solid #ff4040;border-radius: 9px;background-color: #ffff00;padding: 10px 12px 10px 12px;font-size: 26px;margin-top: 0px;margin-bottom: 0px;">
<strong t-field="product.list_price" />
<strong>
<t t-esc="product.company_id.currency_id.symbol"/>
</strong>
</h4>
</td>
<td style="text-align: center;border-top: 0px solid #fff;padding: 0px 5px 0px 5px;" class="col-xs-7">
<img class="img-responsive"
t-att-src="'data:image/png;base64,%s' % res_company.logo"
style="background-color: #fff;margin-left: auto;margin-right: auto;width: auto;height: 16px;margin-bottom: 8px;"/>
<img class="img-responsive" t-if="product.barcode"
t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.barcode, 650, 200)"
style="height: 20px;width: 100%;"/>
<span style="">
<t t-esc="product.barcode"/>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</div>
'report.url'は十分ではありませんか?私はこのパラメータを追加することなく問題なく、nginxでいくつかのOdooインスタンスを設定しました。コードを変更する必要はありません。 – CZoellner
sgin(https)でnginxをお持ちですか?私の問題は製品ラベルを生成することだけでした。私は 'report.url'だけを変更しようとします。あなたのお返事に感謝@CZoellner。 –