Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
6519 Weergaven

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
Annuleer

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

Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
mei 25
1417
3
nov. 24
8152
3
sep. 24
6010
0
mei 22
3304
2
jan. 20
4571