aboutsummaryrefslogtreecommitdiffstats
path: root/servo
diff options
context:
space:
mode:
Diffstat (limited to 'servo')
-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])