Add new field OrderRefund.comment

This commit is contained in:
Raphael Michel
2021-01-15 11:25:09 +01:00
parent 674d7673ce
commit f1cd46f6dc
17 changed files with 103 additions and 38 deletions

View File

@@ -602,6 +602,7 @@ def _unite_transaction_rows(transaction_rows):
"id": ", ".join(sorted(set(r['id'] for r in rows))),
"payer": ", ".join(sorted(set(r['payer'] for r in rows))),
"amount": sum(r['amount'] for r in rows),
"comment": ", ".join(r['comment'] for r in rows if r.get('comment')) or None,
})
return united_transactions_rows
@@ -649,6 +650,7 @@ class RefundExportListView(ListView):
transaction_rows.append({
"amount": refund.amount,
"id": refund.full_id,
"comment": refund.comment,
**{key: data.get(key) for key in ("payer", "iban", "bic")}
})
refund.done(user=self.request.user)