Use upload time as default filter/sort for Trainwreck transactions
also show end time, upload time as grid columns
This commit is contained in:
parent
9caf0e2e1f
commit
aa6e540abd
|
@ -54,6 +54,8 @@ class TransactionView(MasterView):
|
||||||
|
|
||||||
grid_columns = [
|
grid_columns = [
|
||||||
'start_time',
|
'start_time',
|
||||||
|
'end_time',
|
||||||
|
'upload_time',
|
||||||
'system',
|
'system',
|
||||||
'terminal_id',
|
'terminal_id',
|
||||||
'receipt_number',
|
'receipt_number',
|
||||||
|
@ -127,10 +129,10 @@ class TransactionView(MasterView):
|
||||||
super(TransactionView, self).configure_grid(g)
|
super(TransactionView, self).configure_grid(g)
|
||||||
g.filters['receipt_number'].default_active = True
|
g.filters['receipt_number'].default_active = True
|
||||||
g.filters['receipt_number'].default_verb = 'equal'
|
g.filters['receipt_number'].default_verb = 'equal'
|
||||||
g.filters['start_time'].default_active = True
|
g.filters['upload_time'].default_active = True
|
||||||
g.filters['start_time'].default_verb = 'equal'
|
g.filters['upload_time'].default_verb = 'equal'
|
||||||
g.filters['start_time'].default_value = six.text_type(localtime(self.rattail_config).date())
|
g.filters['upload_time'].default_value = six.text_type(localtime(self.rattail_config).date())
|
||||||
g.set_sort_defaults('start_time', 'desc')
|
g.set_sort_defaults('upload_time', 'desc')
|
||||||
|
|
||||||
g.set_enum('system', self.enum.TRAINWRECK_SYSTEM)
|
g.set_enum('system', self.enum.TRAINWRECK_SYSTEM)
|
||||||
g.set_type('total', 'currency')
|
g.set_type('total', 'currency')
|
||||||
|
@ -139,6 +141,8 @@ class TransactionView(MasterView):
|
||||||
g.set_label('customer_id', "Customer ID")
|
g.set_label('customer_id', "Customer ID")
|
||||||
|
|
||||||
g.set_link('start_time')
|
g.set_link('start_time')
|
||||||
|
g.set_link('end_time')
|
||||||
|
g.set_link('upload_time')
|
||||||
g.set_link('receipt_number')
|
g.set_link('receipt_number')
|
||||||
g.set_link('customer_id')
|
g.set_link('customer_id')
|
||||||
g.set_link('customer_name')
|
g.set_link('customer_name')
|
||||||
|
|
Loading…
Reference in a new issue