aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2021-05-24 12:58:39 +0300
committerFilipp Lepalaan <filipp@mac.com>2021-05-24 12:58:39 +0300
commitd2394e47e6baed4f878103477862d1bcc27b816a (patch)
tree73a74876a08142ab7bcc5d081e39970db612a836
parent9d8488a0fb4c6834223e8daa3dc384665b97f982 (diff)
downloadServo-d2394e47e6baed4f878103477862d1bcc27b816a.tar.gz
Servo-d2394e47e6baed4f878103477862d1bcc27b816a.tar.bz2
Servo-d2394e47e6baed4f878103477862d1bcc27b816a.zip
UI fixes
-rw-r--r--servo/models/account.py2
-rwxr-xr-xservo/templates/products/list_rows.html6
-rw-r--r--servo/views/order.py1
3 files changed, 5 insertions, 4 deletions
diff --git a/servo/models/account.py b/servo/models/account.py
index 864535c..2641e81 100644
--- a/servo/models/account.py
+++ b/servo/models/account.py
@@ -263,7 +263,7 @@ class User(AbstractUser):
return reverse('admin-edit_user', args=[self.pk])
def __str__(self):
- return self.get_name() or self.username
+ return self.get_name()
class Meta:
app_label = "servo"
diff --git a/servo/templates/products/list_rows.html b/servo/templates/products/list_rows.html
index c8cf5bb..ebaa733 100755
--- a/servo/templates/products/list_rows.html
+++ b/servo/templates/products/list_rows.html
@@ -8,12 +8,12 @@
<a href="{% url 'products-view_product' pk=p.pk group=group.slug %}"><strong>{{ p.code }}</strong></a><br/>
{{ p.title }}<br/><small class="muted">{{ p.eee_code|default:""|addspace }}</small>
</td>
- <td data-value="{{ p.price_sales_stock|safe }}">{{ p.price_sales_stock|currency }}</td>
- <td data-value="{{ p.price_sales_exchange|safe }}">{{ p.price_sales_exchange|currency }}</td>
+ <td data-value="{{ p.price_sales_stock|safe }}" title="{% trans 'Stocking Price' %}">{{ p.price_sales_stock|currency }}</td>
+ <td data-value="{{ p.price_sales_exchange|safe }}" title="{% trans 'Exchange Price' %}">{{ p.price_sales_exchange|currency }}</td>
{% if p.is_service %}
<td>&infin;</td>
{% else %}
- <td>{{ p|amount_in_location:request.user }}</td>
+ <td title="{% trans 'Amount at your current location' %}">{{ p|amount_in_location:request.user }}</td>
{% endif %}
<td>
<div class="btn-group pull-right">
diff --git a/servo/views/order.py b/servo/views/order.py
index 18c2e3a..0e27e62 100644
--- a/servo/views/order.py
+++ b/servo/views/order.py
@@ -61,6 +61,7 @@ def prepare_list_view(request, args):
orders = orders.filter(state__in=args.getlist("state"))
start_date = args.get("start_date")
+
if start_date:
end_date = args.get('end_date') or timezone.now()
orders = orders.filter(created_at__range=[start_date, end_date])