def save(self, user=None):
        user = user or self.user

        product = super(AddProductForm, self).save(user=user)

        version = model.ProductVersion.objects.create(
            product=product,
            version=self.cleaned_data["version"],
            user=user)

        profile = self.cleaned_data.get("profile")
        if profile is not None:
            version.environments.add(*profile.environments.all())

        return product
Save and return the new Product; also save initial version.
dataset/ETHPy150Open mozilla/moztrap/moztrap/view/manage/products/forms.py/AddProductForm.save