Oscar 3.1 release notes¶
Oscar 3.1 is compatible with Django 2.2, Django 3.1 and Django 3.2 and Python versions 3.6 to 3.9.
Support for Django 3.0 has been dropped.
Improvements have been made to the dashboard interface for creating and editing offers, vouchers, and voucher sets.
These better expose the flexible implementation of offer and voucher functionality, allowing:
creation of offers of all types
creation of vouchers with multiple offers
creation of voucher sets of all usages, and with multiple offers
Details of these changes can be found in the Changes to “dashboard.offers” and “dashboard.vouchers” apps section below.
dashboard.vouchers apps have been reworked significantly. There have also been changes
to the related models, signals, and utility functions in the
You should review these changes, especially if you have made customisations that depends on these apps, as some are backwards incompatible. The functional changes are summarised below.
The dashboard offer list view now displays all types of offer (previously voucher offers were hidden), with the ability to filter the list based on type.
The dashboard offer creation and update views now allow creation of offers of all types (previously only site-wide offers could be created). This exposes the full flexibility of Oscar’s offer types in the dashboard. Note that a new setting (
OSCAR_OFFERS_IMPLEMENTED_TYPES) has been added, which restricts the selectable types to ones that Oscar currently implements.
The dashboard voucher creation and edit views have been signficiantly refactored. Previously, a conditional offer (and associated benefit/condition) was created automatically when creating a new voucher. This is no longer the case and instead the offers must be created separately in advance of assigning them to a voucher. These views now allow assigning multiple offers to a voucher, exposing the full flexibility of this app.
The create view for voucher sets has been changed to no longer create a conditional offer on the fly. As with vouchers, the offer has to be created separately before being assigned to the voucher set.
The logic for generating vouchers for voucher sets has been moved from the
savemethod of the
VoucherSetinto the form logic for the dashboard form. This removes a potentially unsafe and unexpected generation of new vouchers when a voucher set is saved from outside the dashboard.
offer.signalshas been renamed to
offer.receiversfor consistency with other apps.
voucher.signals.delete_unused_related_conditional_offerhas been removed.
voucher.utils.get_offer_namehas been removed, as voucher-type offers are no longer automatically created, updated, and deleted.
catalogue.Option.is_requiredproperty is removed. Check
oscar.apps.dashboard.catalogue.views.filter_productsutility function has been removed. Use the methods provided by
basket.AbstractLine.is_available_for_discountproperty is removed. Use
AbstractProductAttributeValue.value_booleanhas changed from a deprecated
BooleanField. This requires a database migration.
refresh()method was added to
ProductAttributesContainerto allow refreshing attribute information from the database without reinitialising the
providing_argsargument has been removed from all of Oscar’s signals.
oscar.apps.customer.alerts.utils.AlertsDispatcheris now imported dynamically to allow overriding.
The utility functions in
oscar.apps.customer.historyfor reading to and writing from Oscar’s recently viewed products cookie have been refactored into a dynamically loaded
CustomerHistoryManagerclass that projects can override.
The dashboard catalogue search results now include products whose children match the searched parameters.
Python package dependencies:
django-phonenumber-fieldto version 3.0.
factory-boyto version 3.0.
bootstrapto version 4.6.0.
jqueryto version 3.6.0.
tinymceto version 5.7.