Browse Source

fixup! [ADD] beesdoo_posorder_amount: by year

pull/177/head
Manuel Claeys Bouuaert 4 years ago
parent
commit
df29f3ff7c
  1. 8
      beesdoo_website_posorder_amount/controllers/main.py
  2. 2
      beesdoo_website_posorder_amount/templates/portal_posorder_amount.xml

8
beesdoo_website_posorder_amount/controllers/main.py

@ -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"] = (

2
beesdoo_website_posorder_amount/templates/portal_posorder_amount.xml

@ -21,7 +21,7 @@
t-esc-options='{"widget": "monetary", "display_currency": "company_currency"}'/>
.
</p>
<table class="table table-striped">
<table name="posorder_amount_by_year" class="table table-striped">
<tr>
<th>
Year

Loading…
Cancel
Save