Filter by receiving mode, for receiving batch API
This commit is contained in:
parent
d9fecd8eb5
commit
bed9ad76f9
|
@ -55,6 +55,11 @@ class ReceivingBatchViews(APIBatchView):
|
||||||
object_url_prefix = '/receiving-batch'
|
object_url_prefix = '/receiving-batch'
|
||||||
supports_toggle_complete = True
|
supports_toggle_complete = True
|
||||||
|
|
||||||
|
def base_query(self):
|
||||||
|
query = super(ReceivingBatchViews, self).base_query()
|
||||||
|
query = query.filter(model.PurchaseBatch.mode == self.enum.PURCHASE_BATCH_MODE_RECEIVING)
|
||||||
|
return query
|
||||||
|
|
||||||
def normalize(self, batch):
|
def normalize(self, batch):
|
||||||
data = super(ReceivingBatchViews, self).normalize(batch)
|
data = super(ReceivingBatchViews, self).normalize(batch)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue