|
|
@ -34,11 +34,11 @@ class PortalPosOrderAmount(CustomerPortal): |
|
|
|
) |
|
|
|
values["posorder_amount_by_year"] = [ |
|
|
|
{ |
|
|
|
"year": key, |
|
|
|
"amount": sum(element.amount_total for element in group), |
|
|
|
"year": year, |
|
|
|
"amount": sum(pos_order.amount_total for pos_order in grouped_pos_orders), |
|
|
|
} |
|
|
|
for key, group in groupby( |
|
|
|
owned_posorder, key=lambda element: element.date_order.year |
|
|
|
for year, grouped_pos_orders in groupby( |
|
|
|
owned_posorder, key=lambda pos_order: pos_order.date_order.year |
|
|
|
) |
|
|
|
] |
|
|
|
values["company_currency"] = ( |
|
|
|