odoo Qweb report lines in alphabetical order
问题 I'm getting crazy for what I believe it is a really silly matter. I need to render the result of an array in alphabetical order: <tr t-foreach="o.order_line" t-as="l"> <td> <span t-field="l.name"/> </td> should I use a SQL query SELECT * FROM table ORDER BY l.name DESC ? but it seams too complicated, I have the feeling there is a simple condition to render it correctly... any help highly appreciated! Thanks! 回答1: Have a look at this You could set a new variable to order_line.sorted() and then