Skip to content

Commit 7132ff6

Browse files
committed
Merge branch '549-imp-select-point-of-sales-per-production-day'
2 parents df8ac46 + c079c1b commit 7132ff6

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

bakeup/shop/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ class PointOfSale(CommonBaseClass):
598598
is_primary = models.BooleanField(default=False, verbose_name=_("Primary?"))
599599

600600
def __str__(self):
601-
return self.name
601+
return self.short_name or self.name
602602

603603
def get_short_name(self):
604604
return self.short_name or self.name
@@ -1012,7 +1012,7 @@ def replace_message_tags(self, message, request):
10121012
"<a href='{}'>{}</a>".format(order_link, "jetzt ändern")
10131013
),
10141014
"order_link": order_link,
1015-
"point_of_sale": self.point_of_sale,
1015+
"point_of_sale": self.point_of_sale.name,
10161016
}
10171017
)
10181018
)

bakeup/templates/shop/customer_order_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h2 class="mb-3">Bestellübersicht</h2>
5555
{% with has_price=order.price_total %}
5656
<div class="card px-3 py-2 mb-5" id="bestellung-{{ order.pk }}">
5757
<h4 class="fs-5">Backtag: <strong>{{ order.production_day }}</strong></h4>
58-
<h4 class="fs-5">Abholung: <strong>{{ order.point_of_sale|default:'-' }}</strong></h4>
58+
<h4 class="fs-5">Abholung: <strong>{{ order.point_of_sale.name|default:'-' }}</strong></h4>
5959
<div class="row">
6060
<div class="col-12">
6161
<table class="table table-light">

bakeup/templates/shop/includes/checkout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1 class="modal-title fs-4 fw-bold" id="checkoutModalLabel">
2525
{% if point_of_sales %}
2626
<p class=""><span class="min-w-75 d-inline-block">Abholort: </span><select class="form-select form-select-xs d-inline pos-select pe-3 me-1 resizeselect" name="point_of_sale"{% if customer_order.is_locked %} disabled{% endif %}>
2727
{% for point_of_sale in point_of_sales %}
28-
<option value="{{ point_of_sale.pk }}" {% if customer_order.point_of_sale == point_of_sale or not customer_order and user.customer.point_of_sale == point_of_sale %} selected{% endif %}>{{ point_of_sale }}</option>
28+
<option value="{{ point_of_sale.pk }}" {% if customer_order.point_of_sale == point_of_sale or not customer_order and user.customer.point_of_sale == point_of_sale %} selected{% endif %}>{{ point_of_sale.name }}</option>
2929
{% endfor %}
3030
</select></p>
3131
{% endif %}

0 commit comments

Comments
 (0)