123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <!-- Reporte original para la etiqueta del producto -->
- <report
- id="product.report_product_label"
- string="Product Label"
- model="product.product"
- report_type="qweb-pdf"
- file="product_label"
- name="product_labels.product_label"
- />
- <record id="product.report_product_label" model="ir.actions.report.xml">
- <field name="paperformat_id" ref="product_labels.paperformat_product_label"/>
- </record>
- <!-- Nuevo reporte para la etiqueta con precio -->
- <report
- id="product.report_product_label_with_price"
- string="Product Label with Price"
- model="product.product"
- report_type="qweb-pdf"
- file="product_label_with_price"
- name="product_labels.product_label_with_price"
- />
- <record id="product.report_product_label_with_price" model="ir.actions.report.xml">
- <field name="paperformat_id" ref="product_labels.paperformat_product_label"/>
- </record>
- <!-- Plantilla original -->
- <template id="product_label">
- <!-- Multicompany -->
- <t t-if="o and 'company_id' in o">
- <t t-set="company" t-value="o.company_id"/>
- </t>
- <t t-if="not o or not 'company_id' in o">
- <t t-set="company" t-value="res_company"/>
- </t>
- <t t-call="report.html_container">
- <t t-foreach="docs" t-as="product">
- <div class="page">
- <div class="oe_structure"/>
- <div class="row">
- <table style="width: 100%; border: 1px solid black; text-align: center; border-collapse: collapse; margin: 0; padding: 0;">
- <tr>
- <td colspan="2" style="margin: 0; padding: 0;">
- <h5 style="margin: 0; padding: 0;">
- <span t-field="product.display_name"/>
- </h5>
- </td>
- </tr>
- <tr style="border: 1px solid black; margin: 0; padding: 0;">
- <td colspan="2" style="margin: 0; padding: 0;">
- <span t-if="product.ean13">
- <img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.ean13, 600, 13)" style="margin-top: 1px; width:70mm; height:13mm; margin: 0; padding: 0;"/>
- <h5 style="margin: 0; padding: 0;"><span t-esc="product.ean13" /></h5>
- </span>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </t>
- </t>
- </template>
- <!-- Nueva plantilla con precio -->
- <template id="product_label_with_price">
- <!-- Multicompany -->
- <t t-if="o and 'company_id' in o">
- <t t-set="company" t-value="o.company_id"/><t t-if="product">
- <h5><span t-field="product.display_name"/></h5>
- </t>
- </t>
- <t t-if="not o or not 'company_id' in o">
- <t t-set="company" t-value="res_company"/>
- </t>
- <t t-call="report.html_container">
- <t t-foreach="docs" t-as="product">
- <div class="page">
- <div class="oe_structure"/>
- <div class="row">
- <table style="width: 100%; border: 1px solid black; text-align: center; border-collapse: collapse; margin: 0; padding: 0;">
- <tr>
- <td colspan="2" style="margin: 0; padding: 0;">
- <h5 style="margin: 0; padding: 0;">
- <span t-field="product.display_name"/>
- </h5>
- </td>
- </tr>
- <!-- Nueva fila para mostrar el precio -->
- <tr>
- <td colspan="2" style="margin: 0; padding: 0;">
- <h5 style="margin: 0; padding: 0;">
- <span>Precio: </span><span t-field="product.lst_price" />
- </h5>
- </td>
- </tr>
- <tr style="border: 1px solid black; margin: 0; padding: 0;">
- <td colspan="2" style="margin: 0; padding: 0;">
- <span t-if="product.ean13">
- <img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.ean13, 600, 13)" style="margin-top: 1px; width:70mm; height:13mm; margin: 0; padding: 0;"/>
- <h5 style="margin: 0; padding: 0;"><span t-esc="product.ean13" /></h5>
- </span>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </t>
- </t>
- </template>
- </data>
- </openerp>
|