Yeah shure, it's easy when you know how ... i've tried defining
variables in the template ... cause haven't found good docs or
examples all i try gives me
)
TemplateSyntaxError: invalid syntax in expression
"{'{urn:oasis:names:tc:opendocument:xmlns:office:1.0}value': {% total
= 0 %}, '{urn:oasis:names:tc:opendocument:xmlns:office:1.0}value-
type': __relatorio_guess_type({% total = 0 %})}" of "attrs" directive
(, line 1) (/tmp/trytondoNDBe1.odt, line 1
tried relatorio://total = 0 relatorio://<? python total = 0 ?>
rela ...://<% total = 0 %> rela..://{% python total = 0 %}
please some compassion and tell me how to do this. yes ??
thnx.
On 17 ene, 08:58, Nicolas Évrard <[email protected]> wrote:
> * Felipe Alvarez [2012-01-17 01:19 +0100]:
>
> >i need to develop a simple report that makes sums of direrent fields
> >of invoice ( tax/ untaxed tital/ total )
>
> >Does relatorio give some support for grouping functions ? or should i
> >do the computation myself inside the template ? one example
> >please.....
>
> relatorio is just a genshi template so there is more than one
> solution:
>
> - do the computation in the template if it's not too difficult
> - create a function and pass it to the template to do it for you
> - pre-compute the value before and pass it to the template.
>
> You just have to write a bit of python.
>
> --
> Nicolas Évrard
>
> B2CK SPRL
> rue de Rotterdam, 4
> 4000 Liège
> Belgium
> Tel: +32 472 54 46 59
> E-mail/Jabber: [email protected]
> Website:http://www.b2ck.com/
--
[email protected] mailing list