diff --git a/tailbone/views/batch/core.py b/tailbone/views/batch/core.py index 29aa308e..985f5502 100644 --- a/tailbone/views/batch/core.py +++ b/tailbone/views/batch/core.py @@ -627,6 +627,11 @@ class BatchMasterView(MasterView): return tags.link_to(text, url) return text + def render_upc_pretty(self, row, field): + upc = getattr(row, field) + if upc: + return upc.pretty() + def render_row_status(self, row, column): code = row.status_code if code is None: @@ -662,6 +667,10 @@ class BatchMasterView(MasterView): # sequence f.set_readonly('sequence') + # upc (default rendering, just in case there is such a field + # on our row model) + f.set_renderer('upc', self.render_upc_pretty) + # status_code if self.model_row_class: f.set_enum('status_code', self.model_row_class.STATUS)