mirror of
https://github.com/pretix/pretix.git
synced 2026-08-27 13:24:41 +00:00
Bulk order-refund: Create log entries (Z#23203462) (#5357)
This commit is contained in:
@@ -373,6 +373,10 @@ class OrderOverpaidRefundBulkActionView(BaseOrderBulkActionView):
|
|||||||
comment=_("Refund for overpayment"),
|
comment=_("Refund for overpayment"),
|
||||||
provider=payment.provider
|
provider=payment.provider
|
||||||
)
|
)
|
||||||
|
instance.log_action('pretix.event.order.refund.created', {
|
||||||
|
'local_id': refund.local_id,
|
||||||
|
'provider': refund.provider,
|
||||||
|
}, user=self.request.user)
|
||||||
payment.payment_provider.execute_refund(refund)
|
payment.payment_provider.execute_refund(refund)
|
||||||
return True
|
return True
|
||||||
except (ValueError, PaymentException):
|
except (ValueError, PaymentException):
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ def test_order_bulk_overpaid_refund_explicit_id(client, env, order1, order2):
|
|||||||
with scopes_disabled():
|
with scopes_disabled():
|
||||||
assert order1.refunds.exists()
|
assert order1.refunds.exists()
|
||||||
assert order1.refunds.get().amount == Decimal('2.00')
|
assert order1.refunds.get().amount == Decimal('2.00')
|
||||||
|
assert order1.all_logentries().count() == 1
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
|
|||||||
Reference in New Issue
Block a user