|
|
@@ -7,14 +7,14 @@ from django.core.urlresolvers import reverse
|
|
7
|
7
|
from django.core.exceptions import ObjectDoesNotExist
|
|
8
|
8
|
from django.db.models.loading import get_model
|
|
9
|
9
|
from django.db.models import fields, Q, Sum, Count
|
|
10
|
|
-from django.http import HttpResponse, HttpResponseRedirect, Http404
|
|
|
10
|
+from django.http import HttpResponse, HttpResponseRedirect
|
|
11
|
11
|
from django.shortcuts import get_object_or_404
|
|
12
|
|
-from django.template.defaultfilters import date as format_date
|
|
13
|
12
|
from django.utils.datastructures import SortedDict
|
|
14
|
13
|
from django.views.generic import ListView, DetailView, UpdateView, FormView
|
|
15
|
14
|
from django.conf import settings
|
|
16
|
15
|
|
|
17
|
16
|
from oscar.core.loading import get_class
|
|
|
17
|
+from oscar.core.utils import format_datetime
|
|
18
|
18
|
from oscar.apps.dashboard.orders import forms
|
|
19
|
19
|
from oscar.views.generic import BulkEditMixin
|
|
20
|
20
|
from oscar.apps.dashboard.reports.csv_utils import CsvUnicodeWriter
|
|
|
@@ -131,13 +131,13 @@ class OrderListView(ListView, BulkEditMixin):
|
|
131
|
131
|
|
|
132
|
132
|
if data['date_from'] and data['date_to']:
|
|
133
|
133
|
desc_ctx['date_filter'] = _(" placed between %(start_date)s and %(end_date)s") % {
|
|
134
|
|
- 'start_date': format_date(data['date_from']),
|
|
135
|
|
- 'end_date': format_date(data['date_to'])}
|
|
|
134
|
+ 'start_date': format_datetime(data['date_from']),
|
|
|
135
|
+ 'end_date': format_datetime(data['date_to'])}
|
|
136
|
136
|
elif data['date_from']:
|
|
137
|
|
- desc_ctx['date_filter'] = _(" placed since %s") % format_date(data['date_from'])
|
|
|
137
|
+ desc_ctx['date_filter'] = _(" placed since %s") % format_datetime(data['date_from'])
|
|
138
|
138
|
elif data['date_to']:
|
|
139
|
139
|
date_to = data['date_to'] + datetime.timedelta(days=1)
|
|
140
|
|
- desc_ctx['date_filter'] = _(" placed before %s") % format_date(data['date_to'])
|
|
|
140
|
+ desc_ctx['date_filter'] = _(" placed before %s") % format_datetime(data['date_to'])
|
|
141
|
141
|
|
|
142
|
142
|
if data['voucher']:
|
|
143
|
143
|
desc_ctx['voucher_filter'] = _(" using voucher '%s'") % data['voucher']
|
|
|
@@ -286,7 +286,7 @@ class OrderListView(ListView, BulkEditMixin):
|
|
286
|
286
|
row = columns.copy()
|
|
287
|
287
|
row['number'] = order.number
|
|
288
|
288
|
row['value'] = order.total_incl_tax
|
|
289
|
|
- row['date'] = format_date(order.date_placed, 'DATETIME_FORMAT')
|
|
|
289
|
+ row['date'] = format_datetime(order.date_placed, 'DATETIME_FORMAT')
|
|
290
|
290
|
row['num_items'] = order.num_items
|
|
291
|
291
|
row['status'] = order.status
|
|
292
|
292
|
row['customer'] = order.email
|