Fix permission used for mobile receiving item lookup
This commit is contained in:
parent
b309df005c
commit
0469ddea7a
|
@ -93,6 +93,7 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
rows_deletable = False
|
||||
mobile_creatable = True
|
||||
mobile_rows_filterable = True
|
||||
mobile_rows_creatable = True
|
||||
|
||||
row_grid_columns = [
|
||||
'sequence',
|
||||
|
@ -353,12 +354,11 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
url_prefix = cls.get_url_prefix()
|
||||
model_key = cls.get_model_key()
|
||||
permission_prefix = cls.get_permission_prefix()
|
||||
row_permission_prefix = cls.get_row_permission_prefix()
|
||||
|
||||
# mobile lookup (note perm; this view can create new rows)
|
||||
config.add_route('mobile.{}.lookup'.format(route_prefix), '/mobile{}/{{{}}}/lookup'.format(url_prefix, model_key))
|
||||
config.add_view(cls, attr='mobile_lookup', route_name='mobile.{}.lookup'.format(route_prefix),
|
||||
renderer='json', permission='{}.create'.format(row_permission_prefix))
|
||||
renderer='json', permission='{}.create_row'.format(permission_prefix))
|
||||
|
||||
cls._purchasing_defaults(config)
|
||||
cls._batch_defaults(config)
|
||||
|
|
Loading…
Reference in a new issue