Add 'executed' to old batches grid view, make timestamps show "raw" by default.

This commit is contained in:
Lance Edgar 2016-03-11 11:35:00 -06:00
parent a7b73021ac
commit a22f50850f
4 changed files with 54 additions and 10 deletions

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2014 Lance Edgar
# Copyright © 2010-2016 Lance Edgar
#
# This file is part of Rattail.
#
@ -24,14 +24,14 @@
Core Batch Views
"""
from __future__ import unicode_literals
from __future__ import unicode_literals, absolute_import
from pyramid.httpexceptions import HTTPFound
from pyramid.renderers import render_to_response
from webhelpers.html import tags
from tailbone.forms import EnumFieldRenderer
from tailbone import forms
from ...grids.search import BooleanSearchFilter
from .. import SearchableAlchemyGridView, CrudView, View
from ...progress import SessionProgress
@ -91,6 +91,7 @@ class BatchesGrid(SearchableAlchemyGridView):
g.id.label("ID"),
g.destination,
g.description,
g.executed,
g.rowcount.label("Row Count"),
],
readonly=True)
@ -117,7 +118,7 @@ class BatchCrud(CrudView):
def fieldset(self, model):
fs = self.make_fieldset(model)
fs.action_type.set(renderer=EnumFieldRenderer(enum.BATCH_ACTION))
fs.action_type.set(renderer=forms.renderers.EnumFieldRenderer(enum.BATCH_ACTION))
fs.configure(
include=[
fs.source,