Refactor batch views / templates per rattail framework overhaul

This commit is contained in:
Lance Edgar 2016-11-19 18:09:14 -06:00
parent a5184e416a
commit 203f0242fb
12 changed files with 225 additions and 182 deletions
tailbone/views/labels

View file

@ -27,7 +27,6 @@ Views for label batches
from __future__ import unicode_literals, absolute_import
from rattail.db import model
from rattail.db.batch.labels.handler import LabelBatchHandler
from tailbone import forms
from tailbone.views.batch import BatchMasterView
@ -39,7 +38,7 @@ class LabelBatchView(BatchMasterView):
"""
model_class = model.LabelBatch
model_row_class = model.LabelBatchRow
batch_handler_class = LabelBatchHandler
default_handler_spec = 'rattail.batch.labels:LabelBatchHandler'
model_title_plural = "Label Batches"
route_prefix = 'labels.batch'
url_prefix = '/labels/batches'
@ -61,6 +60,9 @@ class LabelBatchView(BatchMasterView):
fs.executed,
fs.executed_by,
])
batch = fs.model
if self.viewing and not batch.handheld_batch:
del fs.handheld_batch
def _preconfigure_row_grid(self, g):
super(LabelBatchView, self)._preconfigure_row_grid(g)