diff --git a/tailbone/views/purchases/batch.py b/tailbone/views/purchases/batch.py index 33f1a4ee..16389463 100644 --- a/tailbone/views/purchases/batch.py +++ b/tailbone/views/purchases/batch.py @@ -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))