With this change phone numbers (any qty) can be added as `ModelForm`
property `phone_numbers_fields` - dict where "keys" are names of
phone numbers fields and "values" are attributes of fields.
* `PhoneNumberMixin` clightly reworked and moved
from `oscar.views.generic` to `oscar.forms.mixins`
* Couple tests added (based on previous tests)
The idea of splitting integration from unittests is good in theory
but leads to a lot of mental overhead. Besides whenever a tests
interacts with a database it isn't a unittest anyway.
It now takes the shipping charge rather than the method. This makes
sense as the shipping charge has normally been calculated before we need
the order total so there is no point in calculating it twice.
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
To support multi-currency sites. This commit also made the order totals
a mandatory input for creating an order, which meant quite a few tests
had to change to support the new API.