Tweak renderer for Amount field for DepositLink view

This commit is contained in:
Lance Edgar 2017-02-10 10:04:45 -06:00
parent 928a3766bc
commit 99776b28d7

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2016 Lance Edgar # Copyright © 2010-2017 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -28,6 +28,7 @@ from __future__ import unicode_literals, absolute_import
from rattail.db import model from rattail.db import model
from tailbone import forms
from tailbone.views import MasterView from tailbone.views import MasterView
@ -38,10 +39,13 @@ class DepositLinksView(MasterView):
model_class = model.DepositLink model_class = model.DepositLink
url_prefix = '/deposit-links' url_prefix = '/deposit-links'
def configure_grid(self, g): def _preconfigure_grid(self, g):
g.filters['description'].default_active = True g.filters['description'].default_active = True
g.filters['description'].default_verb = 'contains' g.filters['description'].default_verb = 'contains'
g.default_sortkey = 'code' g.default_sortkey = 'code'
g.amount.set(renderer=forms.renderers.CurrencyFieldRenderer)
def configure_grid(self, g):
g.configure( g.configure(
include=[ include=[
g.code, g.code,