Add clone support for POS batches

just for testing of course..
This commit is contained in:
Lance Edgar 2023-09-26 17:52:17 -05:00
parent a9e9474f5c
commit abcf1e1895

View file

@ -39,9 +39,15 @@ class POSBatchView(BatchMasterView):
route_prefix = 'batch.pos'
url_prefix = '/batch/pos'
creatable = False
cloneable = True
labels = {
'terminal_id': "Terminal ID",
}
grid_columns = [
'id',
'terminal_id',
'customer',
'created',
'created_by',
@ -55,6 +61,7 @@ class POSBatchView(BatchMasterView):
form_fields = [
'id',
'terminal_id',
'customer',
'params',
'rowcount',
@ -71,7 +78,7 @@ class POSBatchView(BatchMasterView):
row_grid_columns = [
'sequence',
'row_type',
'product',
'item_entry',
'description',
'reg_price',
'txn_price',
@ -98,6 +105,11 @@ class POSBatchView(BatchMasterView):
def configure_grid(self, g):
super().configure_grid(g)
# terminal_id
g.set_label('terminal_id', "Terminal")
if 'terminal_id' in g.filters:
g.filters['terminal_id'].label = self.labels.get('terminal_id', "Terminal ID")
g.set_link('customer')
g.set_link('created')