Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
10878 Переглядів

For example, I have a custom sale order report.
Notes

description                     currency             Amount

basic computer             AED                  23500

Processor core              AED                 2100

Computer Case            AED                  25


i created the record in this order. But i want the records in 

description                     currency             Amount

computer case            AED                     25

Processor core              AED                   2100

Base Computer             AED                  23500


Notes

How to arrange the record in this order.Thanks in advance


      

Аватар
Відмінити
Найкраща відповідь

You have to use sorted function

.sorted(key=lambda a:(a.create_date))

...

Аватар
Відмінити
Автор

Thanks Esther

Найкраща відповідь

Following the Esther Martín steps:


<t t-set="tax_line_ids_sorted" t-value="o.tax_line_ids.sorted(key=lambda a:(a.tax_id.amount))"/>
<t t-foreach="tax_line_ids_sorted" t-as="tax_line">
     ...
</t> 


Jose Carlos Ramos Carmenates

Up3 Group



Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
груд. 18
3237
1
січ. 18
6357
0
лип. 17
5227
0
трав. 17
2990
1
лист. 23
9861