Populate data rows for new mobile purchasing batch, if applicable
i.e. if batch is meant for receiving an existing PO etc.
This commit is contained in:
parent
f0feefc7e5
commit
cb39ca7970
|
@ -943,7 +943,10 @@ class PurchaseBatchView(BatchMasterView):
|
|||
batch.created_by = self.request.user
|
||||
kwargs = self.get_batch_kwargs(batch, mobile=True)
|
||||
batch = self.handler.make_batch(self.Session(), **kwargs)
|
||||
if self.handler.requires_prefill(batch):
|
||||
self.handler.make_initial_rows(batch)
|
||||
self.request.session.flash("Created new purchasing batch: {}".format(batch))
|
||||
# TODO: redirect to mobile receiving view etc. instead
|
||||
return self.redirect(self.request.route_url('purchases.batch.mobile_create'))
|
||||
|
||||
data['mode_title'] = self.enum.PURCHASE_BATCH_MODE[mode].capitalize()
|
||||
|
|
Loading…
Reference in a new issue