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
This commit is contained in:
Enrique Saez
2016-09-01 08:55:02 +02:00
committed by Raphael Michel
parent 022e02d913
commit 841cfe52a2
8 changed files with 114 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-08-22 10:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0031_auto_20160816_0648'),
]
operations = [
migrations.AddField(
model_name='item',
name='allow_cancel',
field=models.BooleanField(default=True, help_text='Whether this product might or not be cancelled.', verbose_name='Allow a product to be cancelled'),
),
]

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-08-22 10:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0032_item_allow_cancel'),
]
operations = [
migrations.AlterField(
model_name='item',
name='allow_cancel',
field=models.BooleanField(default=True, help_text='Whether this product might or not be cancelled.', verbose_name='Allow product to be cancelled'),
),
]

View File

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-08-31 21:04
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0033_auto_20160822_1044'),
('pretixbase', '0034_auto_20160830_1952'),
]
operations = [
]