Fix default row grid config logic for batches
make sure we don't overwrite configured row labels
This commit is contained in:
parent
1570871884
commit
297ca3fe11
|
@ -583,22 +583,20 @@ class BatchMasterView(MasterView):
|
|||
def configure_row_grid(self, g):
|
||||
super(BatchMasterView, self).configure_row_grid(g)
|
||||
|
||||
g.set_sort_defaults('sequence')
|
||||
g.set_link('sequence')
|
||||
g.set_label('sequence', "Seq.")
|
||||
if 'sequence' in g.filters:
|
||||
g.filters['sequence'].label = "Sequence"
|
||||
|
||||
if 'status_code' in g.filters:
|
||||
g.filters['status_code'].set_value_renderer(grids.filters.EnumValueRenderer(self.model_row_class.STATUS))
|
||||
|
||||
g.set_sort_defaults('sequence')
|
||||
|
||||
if self.model_row_class:
|
||||
g.set_enum('status_code', self.model_row_class.STATUS)
|
||||
|
||||
g.set_renderer('status_code', self.render_row_status)
|
||||
|
||||
g.set_label('sequence', "Seq.")
|
||||
g.set_label('status_code', "Status")
|
||||
g.set_label('item_id', "Item ID")
|
||||
|
||||
g.set_link('sequence')
|
||||
|
||||
def get_row_status_enum(self):
|
||||
return self.model_row_class.STATUS
|
||||
|
||||
|
|
Loading…
Reference in a new issue