Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
6502 Tampilan

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
Buang

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

Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
3
Mei 25
1349
3
Nov 24
8080
3
Sep 24
5954
0
Mei 22
3265
2
Jan 20
4537