Skip to content

Saleor Core: the high performance, composable, headless commerce API.

fixing voucher min amount spent creation

MahmoudRizk3d01765ac445
diff --git a/saleor/dashboard/discount/forms.py b/saleor/dashboard/discount/forms.py
index c2809a5d70..bf2d22184c 100644
--- a/saleor/dashboard/discount/forms.py
+++ b/saleor/dashboard/discount/forms.py
@@ -169,7 +169,7 @@ class ProductVoucherForm(CommonVoucherForm):
class Meta:
model = Voucher
- fields = ["products", "apply_once_per_order"]
+ fields = ['products', 'apply_once_per_order', 'min_amount_spent']
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -180,8 +180,8 @@ class ProductVoucherForm(CommonVoucherForm):
class CollectionVoucherForm(CommonVoucherForm):
class Meta:
model = Voucher
- fields = ["collections", "apply_once_per_order"]
- labels = {"collections": pgettext_lazy("Collections", "Collections")}
+ fields = ['collections', 'apply_once_per_order', 'min_amount_spent']
+ labels = {'collections': pgettext_lazy('Collections', 'Collections')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -197,4 +197,4 @@ class CategoryVoucherForm(CommonVoucherForm):
class Meta:
model = Voucher
- fields = ["categories", "apply_once_per_order"]
+ fields = ['categories', 'apply_once_per_order', 'min_amount_spent']