Fix #1001 -- Add product bundles (#1041)

* Data model + Editor

* Cart and order management

* Rebase migrations

* Fix typos, add tests on cart handling

* Add tests for checkout and quotas

* Add API endpoints

* Validation of settings

* Front page tax display

* Voucher handling

* Widget foo

* Show correct net pricing

* Front page tests

* reverse charge foo

* Allow to require bundling

* Fix test failure on postgres
This commit is contained in:
Raphael Michel
2019-03-22 14:48:48 +00:00
committed by GitHub
parent c4b18a4c81
commit 90f881c48e
34 changed files with 2747 additions and 153 deletions

View File

@@ -1691,8 +1691,9 @@ class OrderPosition(AbstractPosition):
# Delete afterwards. Deleting in between might cause deletion of things related to add-ons
# due to the deletion cascade.
for cartpos in cp:
cartpos.addons.all().delete()
cartpos.delete()
if cartpos.pk:
cartpos.addons.all().delete()
cartpos.delete()
return ops
def __str__(self):
@@ -1789,6 +1790,7 @@ class CartPosition(AbstractPosition):
includes_tax = models.BooleanField(
default=True
)
is_bundled = models.BooleanField(default=False)
class Meta:
verbose_name = _("Cart position")