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 declare a variable in aeroo and display it ?

By
Yug Faa
on 5/16/13, 9:19 AM 1,786 views

Hi everybody,

I use aeroo to report on .odt, within a loop for I want ti initializze a variable i=0, then it increments in the loop, and in the end I will show the i

It's my idea to catch the value of i in every loop

<i=0>
<for each="oneaddress in o.address">
<i = i + 1>
</for>
<i>

the error :

__filter() got an unexpected keyword argument 'i'

Any idea, thanks

0

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 5/16/13, 11:31 AM

If you want to use an autoincrement variable, you can change your for tag with this for tag:

<for each="inc in range(count(objects))">

end call the object in the loop with this one

<objects[inc].name or ''>

when you want show the variable you must only use this tag:

<inc>

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: 5/16/13, 9:19 AM
Seen: 1786 times
Last updated: 3/16/15, 8:10 AM