Set form id for new purchasing batch page
This commit is contained in:
parent
6ebb89fac1
commit
39bc1039c4
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue