This allows it to be overriden. Also removes the dashboard_access
permission if the user is not linked to any other partners. This is the
inverse behaviour to link_user.
Add offer data migration to ensure no null descriptions
As reported by @riklaunim, the migration that makes offer description
non-NULLable can cause problems if you already have offers with null
descriptions.
Unfortunately, the only way around this is to insert a new datamigration
before the old one, and to renumber all later migrations. That's what
is done here.
The side-effects for people running against master might be quite
painful as they will need to tinker with their South database tables to
ensure things are consistent. Probably best to remove all entries from
0020 onwards then fake everything. Apologies all round - however, this
is the better long-term fix.
Fixes #977
As discovered in #1003, some fields of ModelForms were not translated.
The issue is that we've used ugettext instead of ugettext_lazy. The
former will be translated whenever model definitions are loaded, whereas
the latter will translate at the last possible moment. Only then do we
know of the appropriate language to use. Hence, we must use
ugettext_lazy for all model defintions.
Ensure checkout is possible when no shipping required
The modifications to ensure that the selected shipping method is still
valid later on were causing an issue for orders that didn't require a
shipping method.
This changes adjusts the default shipping repository to check the basket
to see if it requires shipping. If not, then it returns a single
instance of ShippingNotRequired as the valid method.
Fixes #999
I've had an issue with orders that contain only items that don't require
shipping. In this case, the shipping address could be ``None`` which
breaks the ``create_shipping_address`` method.
I've added a test case for it and provided a simple fix. I wasn't quit
sure if the check should be in ``create_shipping_address`` or in
``place_order`` and only call it for an address that is not ``None``.
I've decided to go with the first because it is also simpler to test
this in isolation but am not fussed about moving it up.
Fixes #956
Fixes #910
Remove unused AbstractProductImage properties for thumbnailing
Images are resized on the template level with Sorl, so having
those properties only leads to confusion. They were not used by stock
Oscar. Furthermore, thumbnail_url returned the full-size image URL,
which is wrong.
Fixes #1011
Previously, every load of new products would add a ------- entry to the
product list. Now it's only added for the first load, and when selecting
no product is actually an allowed choice.
We currently don't have any time fields in Oscar's stock dashboard.
But this change facilitates customising them if added, and makes good
sense as we already support datetime and date fields.
This adds some blocks in the template and extracts the business logic part
of the partner user link view so that custom installations can modify this
behaviour with minimal code and template duplication.
Fixes #971
Babel tried to guess it from the LANG environment variable. But that's
not set in all environments, and would lead to an error in those cases.
Fixes #837
This should greatly increase usability of the dashboard product update
page when managing a large amount of products.
Fixes #618
Conflicts:
oscar/apps/dashboard/catalogue/forms.py
oscar/apps/dashboard/catalogue/views.py
oscar/static/oscar/js/oscar/dashboard.js
oscar/views/generic.py
Widgets for product selection using select2 and ajax