Odoo Help

0

How to execute formatLang in an RML STORY ?

By
Aurélien DUMAINE
on 12/23/13, 11:17 PM 2,425 views

Hello,

I have a RML template using STORY structure exactly like addons/base/res/report/business_card.xsl

In each card there is a date. So I need to print this date in the good TimeZone. So I tried with FormatLang in different ways :

<xsl:template match="order_line" mode="story">
    <xsl:variable name="d"><xsl:value-of select="due_date"/></xsl:variable>
    <para style="nospace">[[ formatLang($d,date_time=True) ]]</para>
    <para style="nospace"><xsl:value-of select="qty"/><xsl:text> </xsl:text><xsl:value-of select="product_name"/></para>
    <para style="nospace"><xsl:value-of select="customer_name"/></para>
    <xsl:if test="position() < last()">
        <nextFrame/>
    </xsl:if>
</xsl:template>


<xsl:template match="order_line" mode="story">
    <xsl:variable name="d"><xsl:value-of select="due_date"/></xsl:variable>
    <para style="nospace"><xsl:value-of select="[[ formatLang($d,date_time=True) ]]/></para>
    <para style="nospace"><xsl:value-of select="qty"/><xsl:text> </xsl:text><xsl:value-of select="product_name"/></para>
    <para style="nospace"><xsl:value-of select="customer_name"/></para>
    <xsl:if test="position() < last()">
        <nextFrame/>
    </xsl:if>
</xsl:template>

But either I get a Internal Error or it prints the function prototype without calling it (as plain text). What's wrong ?

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 12/23/13, 11:17 PM
Seen: 2425 times
Last updated: 3/16/15, 8:10 AM