Skip to Content
Menu
This question has been flagged
3 Replies
10957 Rodiniai

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


      

Portretas
Atmesti
Best Answer

You have to use sorted function

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

...

Portretas
Atmesti
Autorius

Thanks Esther

Best Answer

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



Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
gruod. 18
3352
1
saus. 18
6455
0
liep. 17
5334
0
geg. 17
3105
1
lapkr. 23
9998