Repository: svthalia/concrexit

Issue:
Price of events in newsletter cannot be 0.00
### Describe the bug
When adding events to the newsletters that are free, the price and costs will automatically become 0.00. When I then try to save the newsletter, it gives an error saying that these two fields cannot be 0.00. I manually have to clear them in order to save the newsletter.

### How to reproduce
Steps to reproduce the behaviour:
1. Go to 'Newsletters'
2. Click on 'Add newsletter'
3. Scroll down to 'Newsletter events'
4. Click on 'Add new newsletter event'
5. Add event that does not cost anything
6. Save the newsletter

### Expected behaviour
Two possibilities:
- The newsletter must be able to cope with events that have a price and cost of 0.00, by just removing the price or showing a price of €0.00 in the actual newsletter.
- If an event is free, keep the fields of price and cost empty, when adding an event to the newsletter.

### Screenshots
-

### Additional context
-

Sales product list items do not allow price of 0
### Describe the bug
Sales product list items do not allow price of 0

### How to reproduce
1. Try to add a free product to a sales product list

### Expected behaviour
0 should be allowed

### Screenshots

### Additional context
Caused by #2097, fix like #2118 


Discussion:

Resolving patch:
diff --git a/website/newsletters/models.py b/website/newsletters/models.py
--- a/website/newsletters/models.py
+++ b/website/newsletters/models.py
@@ -150,11 +150,16 @@ class NewsletterEvent(NewsletterContent):
     )
 
     price = PaymentAmountField(
-        verbose_name=_("Price (in Euro)"), blank=True, null=True, default=None,
+        verbose_name=_("Price (in Euro)"),
+        allow_zero=True,
+        blank=True,
+        null=True,
+        default=None,
     )
 
     penalty_costs = PaymentAmountField(
         verbose_name=_("Costs (in Euro)"),
+        allow_zero=True,
         blank=True,
         null=True,
         default=None,
diff --git a/website/sales/models/order.py b/website/sales/models/order.py
--- a/website/sales/models/order.py
+++ b/website/sales/models/order.py
@@ -8,7 +8,6 @@
     Sum,
     Value,
     F,
-    DecimalField,
     Q,
     IntegerField,
     BooleanField,
@@ -98,15 +97,21 @@ class Meta:
 
     subtotal = AnnotationProperty(
         Coalesce(
-            Sum("order_items__total"), Value(0.00), output_field=PaymentAmountField()
+            Sum("order_items__total"),
+            Value(0.00),
+            output_field=PaymentAmountField(allow_zero=True),
         )
     )
 
     total_amount = AnnotationProperty(
         Coalesce(
-            Sum("order_items__total"), Value(0.00), output_field=PaymentAmountField()
+            Sum("order_items__total"),
+            Value(0.00),
+            output_field=PaymentAmountField(allow_zero=True),
+        )
+        - Coalesce(
+            F("discount"), Value(0.00), output_field=PaymentAmountField(allow_zero=True)
         )
-        - Coalesce(F("discount"), Value(0.00), output_field=PaymentAmountField())
     )
 
     num_items = AnnotationProperty(
@@ -197,6 +202,7 @@ class Meta:
     )
     total = PaymentAmountField(
         verbose_name=_("total"),
+        allow_zero=True,
         null=False,
         blank=True,
         validators=[MinValueValidator(Decimal("0.00"))],
diff --git a/website/sales/models/product.py b/website/sales/models/product.py
--- a/website/sales/models/product.py
+++ b/website/sales/models/product.py
@@ -66,7 +66,7 @@ class Meta:
         on_delete=models.CASCADE,
     )
     price = PaymentAmountField(
-        verbose_name=_("price"), validators=[MinValueValidator(0)],
+        verbose_name=_("price"), allow_zero=True, validators=[MinValueValidator(0)],
     )
 
     def __str__(self):


Test patch: