<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <data>
        <template id="report_simple_label">
            <div class="col-4" style="padding:0;">
                <table class="table table-condensed" style="border-bottom: 0px solid white !important;width: 3in;">
                    <tr>
                        <th style="text-align: left;">
                            <strong t-field="product.display_name"/>
                        </th>
                    </tr>
                    <tr>
                        <td>
                            <strong>Price:</strong>
                            <strong t-field="product.list_price" t-options="{'widget': 'monetary', 'display_currency': product.company_id.currency_id}"/>
                        </td>
                    </tr>
                      <t t-if="product.barcode">
                        <tr>
                        <td style="text-align: center; vertical-align: middle;" class="col-5">
                            <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:20%;"/>
                            <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:20%;"/>
                            <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, 150)" style="width:100%;height:20%;"/>
                            <span t-field="product.barcode"/>
                        </td>
                    </tr>
                  </t>
                </table>
            </div>
        </template>
        <template id="report_productlabel">
            <t t-call="web.basic_layout">
                <div class="page">
                    <t t-foreach="docs" t-as="product">
                        <t t-call="product.report_simple_label">
                            <t t-set="product" t-value="product"/>
                        </t>
                    </t>
                </div>
            </t>
        </template>
        <template id="report_simple_barcode">
            <div class="col-4" style="padding:0;">
                <table class="table table-condensed" style="border-bottom: 0px solid white !important;width: 3in;">
                    <tr>
                        <th style="text-align: left;">
                            <strong t-field="product.display_name"/>
                        </th>
                    </tr>
                    <t t-if="product.barcode">
                    <tr>
                        <td style="text-align: center; vertical-align: middle;" class="col-5">
                            <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:20%;"/>
                            <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:20%;"/>
                            <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, 150)" style="width:100%;height:20%;"/>
                            <span t-field="product.barcode"/>
                        </td>
                    </tr>
                  </t>
                </table>
            </div>
        </template>
        <template id="report_productbarcode">
            <t t-call="web.basic_layout">
                <div class="page">
                    <t t-foreach="docs" t-as="product">
                        <t t-call="product.report_simple_barcode">
                            <t t-set="product" t-value="product"/>
                        </t>
                    </t>
                </div>
            </t>
        </template>
    </data>
</odoo>
