This completes the move away from partner wrappers to strategies. All
the methods for determining price and availability information have now
been removed from the partner classes.
The helper policy class ("DelegateToStockRecord") have been removed too
as they no longer have methods to call on the stockrecord.
Add two selector methods to get partner's addresses
Introduced get_primary_address and get_address_for_stockrecord. I opted
to implement rudimentary logic supporting only one PartnerAddress
instead of raising NotImplemented. I'm assuming that given the demand
for multiple partners scenario, it is more likely than not that a user
will need to store an address for a partner.
This allows updating code in both places, if necessary. Getting Django
1.5 support would be painful otherwise. This also removes the circular
dependency of django-oscar-testsupport on Oscar.
The requirements were merged. The imports were updated
accordingly. Unused imports in the touched files were removed. No
further changes.
* Fixes bug with prefetch_related where looking up secondary relations
raises a DoesNotExist exception.
* Reworks cached partner map to use PKs instead of names.
Availability logic from product class is looked up in product obj
rather than in wrapper to avoid unnecessary queries.
Added some basic price/tax calculation methods to the core stock record.
This seems to be a simpler and better place for the price calculation at
the moment. We could introduce a calculator object at some point to
separate the responsibilities.