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

How to execute formatLang in an RML STORY ?

By
Aurélien DUMAINE
on 12/23/13, 11:17 PM 1,994 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 ?

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

0 follower(s)

Stats

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