Add department UUID to JSON returned for "eligible purchases" when creating batch
This commit is contained in:
parent
25866798cf
commit
ed06ada8c4
|
@ -253,7 +253,9 @@ class PurchaseBatchView(BatchMasterView):
|
|||
purchases = purchases.filter(model.Purchase.status == self.enum.PURCHASE_STATUS_RECEIVED)\
|
||||
.order_by(model.Purchase.date_received, model.Purchase.created)
|
||||
|
||||
return {'purchases': [{'key': p.uuid, 'display': self.render_eligible_purchase(p)}
|
||||
return {'purchases': [{'key': p.uuid,
|
||||
'department_uuid': p.department_uuid or '',
|
||||
'display': self.render_eligible_purchase(p)}
|
||||
for p in purchases]}
|
||||
|
||||
def render_eligible_purchase(self, purchase):
|
||||
|
|
Loading…
Reference in a new issue