Add sales channels (#1103)

- [x] Data model
- [x] Enforce constraint
- [x] Filter order list
- [x] Set channel on created order
- [x] Products API
- [x] Order API
- [x] Tests
- [x] Filter reports
- [x] Resellers
- [ ] deploy plugins
  - [ ] posbackend
  - [ ] resellers
  - [ ] reports
- [x] Ticketlayouts
- [x] Support in pretixPOS
This commit is contained in:
Raphael Michel
2018-11-23 15:35:09 +01:00
committed by GitHub
parent 0f76779fb1
commit b4290384e1
39 changed files with 472 additions and 57 deletions

View File

@@ -212,6 +212,7 @@ TEST_ITEM_RES = {
"name": {"en": "Budget Ticket"},
"internal_name": None,
"default_price": "23.00",
"sales_channels": ["web"],
"category": None,
"active": True,
"description": None,
@@ -352,6 +353,7 @@ def test_item_create(token_client, organizer, event, item, category, taxrule):
"en": "Ticket"
},
"active": True,
"sales_channels": ["web", "pretixpos"],
"description": None,
"default_price": "23.00",
"free_price": False,
@@ -373,6 +375,7 @@ def test_item_create(token_client, organizer, event, item, category, taxrule):
format='json'
)
assert resp.status_code == 201
assert Item.objects.get(pk=resp.data['id']).sales_channels == ["web", "pretixpos"]
@pytest.mark.django_db