Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
6478 Vistas

Im trying to print product labels for the product variant , each variant has variant attributes like size and color. For me it only prints one variant attribute for each variant like only size or only color, any ideas how to print multipe?

There is a link to the image displaying my issue

http://s1.postimg.org/oopgmal67/product_label.png

Any help would be appreciated

Thanks

Avatar
Descartar

Hello Darius, http://tidyway.blogspot.in/2015/01/barcode-label-report-in-odoo-v8.html

Mejor respuesta

For Printing Variant Attributes and Attributes Price for the product ..

in product/report/product-label.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<lots>
 <lot-line type="fields" name="id">
 <code type="field" name="code"/>
 <product type="field" name="name"/>
<price type="field" name="lst_price"/>
 <ean13 type="field" name="ean13"/>
 <currency type="field" name="company_id.currency_id.name"/>
 <!--.....editingg....-->
 <attribute_value_ids type="zoom" name="attribute_value_ids">
 <attribute_value_ids_name type="field" name="name"/>
 </attribute_value_ids>
 <!--......end....-->
 </lot-line>
</lots>

and u also need to some changes in product_label.xsl

<xsl:template match="lot-line" mode="story"> 
 <blockTable style="mytable" colWidths="2.8cm,5.4cm">
 <tr>
 <td>
 <para style="nospace"><xsl:value-of select="code"/></para>
 </td>
 <td>
 <para style="nospace" t="1"><xsl:value-of select="price"/><xsl:text> </xsl:text><xsl:value-of select="currency"/></para>
 </td>
 </tr>
 <tr>
 <td>
 <barCode>
<xsl:value-of select="ean13" />
</barCode>
 </td>
 <td>
 <!--......................Instead of this write the below line for the variant..............-->
 <!--<para style="nospace"><xsl:value-of select="substring(product, 1, $pmaxChars)"/></para><xsl:text>, </xsl:text>-->
 <!--<para style="nospace"><xsl:value-of select="variant"/></para>-->
 <para style="nospace"><xsl:value-of select="substring(product, 1, $pmaxChars)"/></para><xsl:text>, </xsl:text>
 <para style="nospace"><xsl:apply-templates select="attribute_value_ids"/></para>
 <!--........................................End............................................-->
 </td>
 </tr>
 </blockTable>
<nextFrame/>
</xsl:template>
Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
may 25
1269
3
nov 24
7998
3
sept 24
5861
0
may 22
3219
2
ene 20
4518