Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have an array of values which I can use the
<t t-foreach="docs" t-as="doc">
Here is a summary of the code and its printout.
(THIS IS NOT REAL CODE JUST FOR DEMONSTRATION OF CONCEPT)
<t t-esc="doc.field"/> <br/>
<t t-foreach="doc.field" t-as="item">
<t t-esc="item"/> <br/>
<br/> <br/> <br/>
THIS CODE OUTPUTS THIS
model.field(1, 2, 3, 4, 5, 6)
As you can see the years are not in the correct order. What I would like to do would be.
<t t-set="newList" t-value="sorted(doc.field, key=lambda k: k['year'])"/>
<t t-foreach="newList" t-as="newItem">
However I get an error. I think the object none type or something like that.
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
|Asked: 9/10/15, 7:52 AM|
|Seen: 3592 times|
|Last updated: 9/11/15, 4:17 PM|