On Martes 17 Enero 2012 15:43:22 [email protected] escribió: > Hi, > > Le 17 janv. 2012 à 19:22, felipon a écrit : > > i need to do somethig like in open document template > > > > <? python total = 0 > > > > > for each="o in objects" > > > > <? python total += o.something ?> > > > > /for > > > > > > total > > > > but relatorio does not like <? python .... > > > > > how one should do things like this ??? > > Here is how I proceed : > > (enter your expressions in openoffice fields) > > <with vars="myvar = 'foo'"> > <myvar = 'bar'> > Myvar has value <myvar> > </with> > > See examples in *.odt in the modules. > > Jean-Christophe Michel > -- > Symétrie > livres et partitions, édition multimédia > 30 rue Jean-Baptiste Say > 69001 LYON (FRANCE) > > tél +33 (0)478 29 52 14 > fax +33 (0)478 30 01 11 > web www.symetrie.com
Thanks for your reply, this > <with vars="myvar = 'foo'"> > <myvar = 'bar'> > Myvar has value <myvar> > </with> does not work for me, at least with inner loop, i alway get 'foo' instead of bar. looking some templates it appears a sum function, i've read genshi and relatorio docs and never see that, anyway in trial_balance odt appears SUM(ACCOUNTS,'CREDIT') so i suppose that SUM sums over ACCOUNTS the credit field. So i do sum(objects,'tax_amount') and TypeError: sum() can't sum strings [use ''.join(seq) instead] im triying to get totals over selected invoices please enlightenme many thnx. -- Felipe Alvarez Harnecker [email protected] - 9.874.60.17 -- [email protected] mailing list
