Set form id for new purchasing batch page

This commit is contained in:
Lance Edgar 2017-02-14 22:06:42 -06:00
parent 6ebb89fac1
commit 39bc1039c4

View file

@ -124,6 +124,12 @@ class PurchaseBatchView(BatchMasterView):
],
readonly=True)
def make_form(self, batch, **kwargs):
if self.creating:
kwargs.setdefault('id', 'new-purchase-form')
form = super(PurchaseBatchView, self).make_form(batch, **kwargs)
return form
def _preconfigure_fieldset(self, fs):
super(PurchaseBatchView, self)._preconfigure_fieldset(fs)
fs.mode.set(renderer=forms.renderers.EnumFieldRenderer(self.enum.PURCHASE_BATCH_MODE))