Commit Graph

66 Commits

Author SHA1 Message Date
Raphael Michel
a02ea45dba Allow quotas to "close" when once full (#1344)
* Model

* Some UI

* API and logging

* Permission check

* Add tests

* Move option around
2019-07-16 14:02:27 +02:00
Raphael Michel
93089d87e3 Add support for reserved seating (#1228)
* Initial work on seating

* Add seat guids

* Add product_list_top

* CartAdd: Ignore item when a seat is passed

* Cart display

* product_list_top → render_seating_plan

* Render seating plan in voucher redemption

* Fix failing tests

* Add tests for extending cart positions with seats

* Add subevent_forms to docs

* Update schema, migrations

* Dealing with expired orders

* steps to order change

* Change order positions

* Allow to add seats

* tests for ocm

* Fix things after rebase

* Seating plans API

* Add more tests for cart behaviour

* Widget support

* Adjust widget tests

* Re-enable CSP

* Update schema

* Api: position.seat

* Add guid to word list

* API: (sub)event.seating_plan

* Vali fixes

* Fix api

* Fix reference in test

* Fix test for real
2019-06-25 11:00:03 +02:00
Raphael Michel
d85ddb5bda Integrate django-scopes (#1319)
* Install django-scopes

* Fix tests.api

* Update tasks and cronjobs

* Fix remaining tests

* Remove unused import

* Fix tests after rebase

* Disable scopes for get_Events_with_any_permission

* Disable scopes for a management command
2019-06-17 10:46:55 +02:00
Raphael Michel
ef600ceddb Fix invalid handling of variations with quota-level vouchers 2019-04-25 11:54:03 +02:00
Raphael Michel
6d1dea7922 Upgrade to Django 2.2 and modern DRF and py.test (#1246)
* Upgrade django and stuff

* Update to Django 2.2 and recent versions of similar packages

* Provide explicit orderings to all models used in paginated queries

* Resolve naive datetime warnings in test suite

* Deal with deprecation warnings

* Fix sqlparse version
2019-04-07 14:09:49 +01:00
Raphael Michel
90f881c48e 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
2019-03-22 14:48:48 +00:00
Raphael Michel
12b48948e3 Add a new notification category for overpayments 2019-03-08 11:40:22 +01:00
Raphael Michel
da8da01614 Fix #1148 -- Reduce number of cases in which we show "Reserved" 2019-01-28 10:43:52 +01:00
Raphael Michel
3703fbcacf Do not allow customers to cancel checked-in orders 2019-01-21 09:09:54 +01:00
Raphael Michel
06eddb2c6d Self-service refund form (#1135)
* Auto-refund

* Add missing template

* Notification for requested refund

* Model-level tests

* Add front-end tests

* Default to notify
2019-01-18 17:24:42 +01:00
Raphael Michel
60c1ea8aad Allow to keep cancellation fees (#1130)
* Allow to keep cancellation fees

* Add tests and clarifications

* Add API
2019-01-11 15:42:33 +01:00
Raphael Michel
8abfbba9d0 Refactor cancelling positions and orders in the data model (#1088)
- [x] Data model
- [x] display in order view in backend
- [x] review all usages of OrderPositions.objects
- [x] review all usages of order.positions
- [x] review all other model usages
- [x] review plugins
- [x] plugins backwards-compatible API?
- [x] decide on way forward for REST API
- [x] need to cancel fees
- [x] tests
- [ ] plugins
  - [ ] gdpr
  - [ ] reports
- [x] docs
2019-01-10 16:52:34 +01:00
Raphael Michel
d267dfc682 Fix #785 -- Show availability in (sub)event list (#1112) 2018-12-11 13:59:49 +01:00
Raphael Michel
0a2cd208b2 Fix invalid tests 2018-09-03 16:55:04 +02:00
Raphael Michel
678a936897 Fix #999 -- Clarify definition of overpaid 2018-09-03 16:30:23 +02:00
Raphael Michel
afd766999c Upgrade to Django 2.1 (#710)
* Upgrade to Django 2.0

* more models

* i18n foo

* Update setup.py

* Fix Sentry exception PRETIXEU-JC

* Enforce slug uniqueness

* Import sorting

* Upgrade to Django 2.1

* Travis config

* Try to fix PostgreSQL failure

* Smaller test matrix

* staticfiles→static

* Include request in all authenticate() calls
2018-08-06 12:48:46 +02:00
Raphael Michel
18a378976b Fix #571 -- Partial payments and refunds 2018-08-06 12:24:36 +02:00
Raphael Michel
00ee58d3fd Refs #860 -- Do not create objets in setUpTestData that are later mutated 2018-04-10 11:23:08 +02:00
Raphael Michel
3fbccf3f64 Allow check-in lists to include unpaid orders 2018-02-21 16:17:06 +01:00
Raphael Michel
67678e35bb Disable shop and waiting list after end of event 2018-02-04 14:14:49 +01:00
Raphael Michel
d0dfde382c Questions at check-in time (#745)
Questions at check-in time
2018-01-22 22:55:54 +01:00
Raphael Michel
15aff6030c Fix annotated check-in list query 2017-12-13 23:20:44 +01:00
Raphael Michel
353dce789d Fix #515 -- Add check-in lists (#693)
* Data model and migration

* Some backwards compatibility

* CRUD for checkin lists

* Show and perform checkins

* Correct numbers in table and dashboard widget

* event creation and cloning

* Allow to link specific exports and pass options per query

* Play with the CSV export

* PDF export

* Collapse exports by default

* Improve PDF exporter

* Addon stuff

* Subevent stuff, pretixdroid tests

* pretixdroid tests

* Add CRUD API

* Test compatibility

* Fix test

* DB-independent sorting behavior

* Add CRUD and coyp tests

* Re-enable pretixdroid plugin

* pretixdroid config

* Tests & fixes
2017-12-04 18:12:23 +01:00
Raphael Michel
7916e81745 Fix incorrect test 2017-10-24 18:42:50 +02:00
Raphael Michel
cb6f6247fd Marking orders as paid now ignores waiting list 2017-10-24 12:48:38 +02:00
Raphael Michel
56338be13e Tax rules and reverse charge (#559)
Tax rules and reverse charge
2017-08-23 13:13:16 +03:00
Raphael Michel
8123effa65 Add sub-events and relative date settings (#503)
* Data model

* little crud

* SubEventItemForm etc

* Drop SubEventItem.active, quota editor

* Fix failing tests

* First frontend stuff

* Addons form stuff

* Quota calculation

* net price display on EventIndex

* Add tests, solve some bugs

* Correct quota selection in more places, consolidate pricing logic

* Fix failing quota tests

* Fix TypeError

* Add tests for checkout

* Fixed a bug in QuotaForm

* Prevent immutable cart if a quota was removed from an item

* Add tests for pricing

* Handle waiting list

* Filter in check-in list

* Fixed import lost in rebase

* Fix waiting list widget

* Voucher management

* Voucher redemption

* Fix broken tests

* Add subevents to OrderChangeManager

* Create a subevent during event creation

* Fix bulk voucher creation

* Introduce subevent.active

* Copy from for subevents

* Show active in list

* ICal download for subevents

* Check start and end of presale

* Failing tests / show cart logic

* Test

* Rebase migrations

* REST API integration of sub-events

* Integrate quota calculation into the traditional quota form

* Make subevent argument to add_position optional

* Log-display foo

* pretixdroid and subevents

* Filter by subevent

* Add more tests

* Some mor tests

* Rebase fixes

* More tests

* Relative dates

* Restrict selection in relative datetime widgets

* Filter subevent list

* Re-label has_subevents

* Rebase fixes, subevents in calendar view

* Performance and caching issues

* Refactor calendar templates

* Permission tests

* Calendar fixes and month selection

* subevent selection

* Rename subevents to dates

* Add tests for calendar views
2017-07-11 13:56:00 +02:00
Raphael Michel
76ec402fc5 Fix #436 -- Fix test cases broken in aed78c2d 2017-03-19 13:58:08 +01:00
Raphael Michel
c83f539bba Add waiting list 2017-02-07 10:03:30 +01:00
Raphael Michel
0acee0e362 Get rid of User.givenname and User.familyname 2017-01-07 16:35:04 +01:00
Raphael Michel
852bc6c128 Avoid duplicate order position secrets 2016-12-20 14:48:41 +01:00
Raphael Michel
7154d3f510 Fix setting a voucher price to 0 2016-12-07 11:31:37 +01:00
Raphael Michel
eea6a5e9da Refs #145 -- Vouchers that grant discounts 2016-11-29 16:18:07 +01:00
Raphael Michel
a8be2d5f24 Fix a test that fails on MySQL 2016-11-29 15:17:11 +01:00
Raphael Michel
db6fb51fc6 Refs #145 -- Multi-use vouchers 2016-11-27 16:02:40 +01:00
Christopher Dambamuromo
9662b956ed Fix #294 -- Blacklist for slug validation (#325)
* Fix #294 - blacklist for slug validation

* Fix #294 - blacklist for slug validation

* fix for failing test
2016-11-21 11:57:52 +01:00
Tobias Kunze
142750f8c2 Add tests for Events 2016-11-17 23:50:42 +01:00
Raphael Michel
8c4023f065 Add regression tests for bug fixed in d8b833c 2016-10-30 16:58:19 +01:00
Tobias Kunze
aa63a4cded Improved voucher interface with new methods (#284)
* Check that a voucher's variation matches its item

* Add method to check applicability of a voucher

* Add method to check if a voucher can be used

* Add tests for new voucher methods

* Test for ValidationErrors in Voucher.clean()

* Test for voucher state during ordering process
2016-10-24 12:40:06 +02:00
Enrique Saez
841cfe52a2 Fix #91 -- Make products/orders that are not cancelable (#204)
* Make products/orders that are not cancellable
Update Unit Tests

* Make use of select_related instead of prefetch_related
Simplify cancellable logic
Migrations

* Simplify cancellable logic
Maske use of select_related instead of prefetch_related

* Fix cancelable condition bug
2016-09-01 08:55:02 +02:00
Tobias Kunze
87a77989e7 Disallow cancelling an expired order
as per discussion on #165
2016-08-24 15:26:54 +02:00
Raphael Michel
63b683096b Resolved two more edge cases in quota handling
Scenario 1) Blocking voucher is used in a CartPosition. Previously
too much was subtracted from the quota.

Scenario 2) When two quotas are assigned to a product and one of them
is sold out, blocking vouchers for the other quota should not enable to
buy the product.
2016-08-15 22:55:18 +02:00
Raphael Michel
fe6de0f635 Added ignored_quotas argument to check_quotas() 2016-08-15 11:48:48 +02:00
Raphael Michel
e881abd631 Fixed test that was broken due to 6d54239 2016-08-14 17:19:00 +02:00
Raphael Michel
58e706b721 Fixed bug in quota calculation (thanks @rixx!) 2016-08-04 18:00:28 +02:00
Raphael Michel
749e44f6e4 Fixed broken test 2016-05-08 13:06:51 +02:00
Raphael Michel
944b5db0bf Refs #82 -- Make order expiry more clear (#116) 2016-05-07 17:03:32 +02:00
Raphael Michel
09cee356b0 Allow for vouchers that are valid for multiple items 2016-05-04 17:50:19 +02:00
Raphael Michel
842b058efd Fixed an quota calculation issue 2016-03-22 17:43:35 +01:00
Raphael Michel
f748752391 Removed multi-dimensional item variations [backwards-incompatible] 2015-12-13 15:03:56 +01:00