|
@@ -2,6 +2,7 @@
|
|
|
<openerp>
|
|
|
<data>
|
|
|
|
|
|
+ <!-- Reporte original para la etiqueta del producto -->
|
|
|
<report
|
|
|
id="product.report_product_label"
|
|
|
string="Product Label"
|
|
@@ -15,46 +16,100 @@
|
|
|
<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-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>
|
|
|
- <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>
|
|
|
+ <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>
|