tangentlabs/django-oscar — pull request #262 by elbaschid (2012-07-31 01:37:40+00:00)
Title: Minor fixes for proper handling of product variants

This provides two fixes for product variants:

1. The ``basket_form`` template tag provided the product ID as the initial value to the forms ``product_id`` field. This is correct for toplevel products but not for product variants. I updated the template tag to provide the first element of the variants if the product is not a toplevel product.

2. There was an issue with the product update page as discussed on Basecamp. Not providing a stockrecord to a product in the dashboard would fail with an invalid stockrecord form. I updated the view in a similar way to the ``ProductCreateView``.