More tweaks to support mobile inventory batches

This commit is contained in:
Lance Edgar 2017-07-11 21:59:12 -05:00
parent 8a5dbc33a7
commit 1791bd745b
4 changed files with 24 additions and 11 deletions

View file

@ -326,11 +326,6 @@ class ReceivingBatchView(PurchasingBatchView):
row.credits.append(credit)
return credit
def mobile_mark_complete(self):
batch = self.get_instance()
batch.complete = True
return self.redirect(self.request.route_url('mobile.{}'.format(self.get_route_prefix())))
@classmethod
def defaults(cls, config):
route_prefix = cls.get_route_prefix()
@ -344,11 +339,6 @@ class ReceivingBatchView(PurchasingBatchView):
config.add_view(cls, attr='mobile_lookup', route_name='mobile.{}.lookup'.format(route_prefix),
renderer='json', permission='{}.create'.format(row_permission_prefix))
# mobile mark complete
config.add_route('mobile.{}.mark_complete'.format(route_prefix), '/mobile{}/{{{}}}/mark-complete'.format(url_prefix, model_key))
config.add_view(cls, attr='mobile_mark_complete', route_name='mobile.{}.mark_complete'.format(route_prefix),
permission='{}.edit'.format(permission_prefix))
cls._purchasing_defaults(config)
cls._batch_defaults(config)
cls._defaults(config)