Add clone support for POS batches
just for testing of course..
This commit is contained in:
parent
a9e9474f5c
commit
abcf1e1895
|
@ -39,9 +39,15 @@ class POSBatchView(BatchMasterView):
|
||||||
route_prefix = 'batch.pos'
|
route_prefix = 'batch.pos'
|
||||||
url_prefix = '/batch/pos'
|
url_prefix = '/batch/pos'
|
||||||
creatable = False
|
creatable = False
|
||||||
|
cloneable = True
|
||||||
|
|
||||||
|
labels = {
|
||||||
|
'terminal_id': "Terminal ID",
|
||||||
|
}
|
||||||
|
|
||||||
grid_columns = [
|
grid_columns = [
|
||||||
'id',
|
'id',
|
||||||
|
'terminal_id',
|
||||||
'customer',
|
'customer',
|
||||||
'created',
|
'created',
|
||||||
'created_by',
|
'created_by',
|
||||||
|
@ -55,6 +61,7 @@ class POSBatchView(BatchMasterView):
|
||||||
|
|
||||||
form_fields = [
|
form_fields = [
|
||||||
'id',
|
'id',
|
||||||
|
'terminal_id',
|
||||||
'customer',
|
'customer',
|
||||||
'params',
|
'params',
|
||||||
'rowcount',
|
'rowcount',
|
||||||
|
@ -71,7 +78,7 @@ class POSBatchView(BatchMasterView):
|
||||||
row_grid_columns = [
|
row_grid_columns = [
|
||||||
'sequence',
|
'sequence',
|
||||||
'row_type',
|
'row_type',
|
||||||
'product',
|
'item_entry',
|
||||||
'description',
|
'description',
|
||||||
'reg_price',
|
'reg_price',
|
||||||
'txn_price',
|
'txn_price',
|
||||||
|
@ -98,6 +105,11 @@ class POSBatchView(BatchMasterView):
|
||||||
def configure_grid(self, g):
|
def configure_grid(self, g):
|
||||||
super().configure_grid(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('customer')
|
||||||
|
|
||||||
g.set_link('created')
|
g.set_link('created')
|
||||||
|
|
Loading…
Reference in a new issue