Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Product label prints only one variant attribute

By
DM
on 1/30/15, 5:33 AM 1,152 views

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

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

Tidy Way
on 2/2/15, 9:25 AM
1
Deepak Krishna
On 3/28/16, 2:05 AM

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>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/30/15, 5:33 AM
Seen: 1152 times
Last updated: 3/28/16, 2:05 AM