ソースを参照

Add FK to shipping event from payment event

This allows them to be linked together which is often how the occur in
the real world.
master
David Winterbottom 12年前
コミット
8bcd72ddfa

+ 7
- 1
oscar/apps/order/abstract_models.py ファイルの表示

@@ -704,7 +704,13 @@ class AbstractPaymentEvent(models.Model):
704 704
         verbose_name=_("Lines"))
705 705
     event_type = models.ForeignKey(
706 706
         'order.PaymentEventType', verbose_name=_("Event Type"))
707
-    date_created = models.DateTimeField(_("Date Created"), auto_now_add=True)
707
+    # Allow payment events to be linked to shipping events.  Often a shipping
708
+    # event will trigger a payment event and so we can use this FK to capture
709
+    # the relationship.
710
+    shipping_event = models.ForeignKey(
711
+        'order.ShippingEvent', related_name='payment_events',
712
+        null=True)
713
+    date_created = models.DateTimeField(_("Date created"), auto_now_add=True)
708 714
 
709 715
     class Meta:
710 716
         abstract = True

+ 381
- 0
oscar/apps/order/migrations/0013_auto__add_field_paymentevent_shipping_event.py ファイルの表示

@@ -0,0 +1,381 @@
1
+# -*- coding: utf-8 -*-
2
+import datetime
3
+from south.db import db
4
+from south.v2 import SchemaMigration
5
+from django.db import models
6
+
7
+
8
+class Migration(SchemaMigration):
9
+
10
+    def forwards(self, orm):
11
+        # Adding field 'PaymentEvent.shipping_event'
12
+        db.add_column('order_paymentevent', 'shipping_event',
13
+                      self.gf('django.db.models.fields.related.ForeignKey')(related_name='payment_events', null=True, to=orm['order.ShippingEvent']),
14
+                      keep_default=False)
15
+
16
+
17
+    def backwards(self, orm):
18
+        # Deleting field 'PaymentEvent.shipping_event'
19
+        db.delete_column('order_paymentevent', 'shipping_event_id')
20
+
21
+
22
+    models = {
23
+        'address.country': {
24
+            'Meta': {'ordering': "('-is_highlighted', 'name')", 'object_name': 'Country'},
25
+            'is_highlighted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
26
+            'is_shipping_country': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
27
+            'iso_3166_1_a2': ('django.db.models.fields.CharField', [], {'max_length': '2', 'primary_key': 'True'}),
28
+            'iso_3166_1_a3': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'db_index': 'True'}),
29
+            'iso_3166_1_numeric': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'db_index': 'True'}),
30
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
31
+            'printable_name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
32
+        },
33
+        'auth.group': {
34
+            'Meta': {'object_name': 'Group'},
35
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
36
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
37
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
38
+        },
39
+        'auth.permission': {
40
+            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
41
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
42
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
43
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
44
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
45
+        },
46
+        'auth.user': {
47
+            'Meta': {'object_name': 'User'},
48
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
49
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
50
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
51
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
52
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
53
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
54
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
55
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
56
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
57
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
58
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
59
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
60
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
61
+        },
62
+        'catalogue.attributeentity': {
63
+            'Meta': {'object_name': 'AttributeEntity'},
64
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
65
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
66
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'blank': 'True'}),
67
+            'type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'entities'", 'to': "orm['catalogue.AttributeEntityType']"})
68
+        },
69
+        'catalogue.attributeentitytype': {
70
+            'Meta': {'object_name': 'AttributeEntityType'},
71
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
72
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
73
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'blank': 'True'})
74
+        },
75
+        'catalogue.attributeoption': {
76
+            'Meta': {'object_name': 'AttributeOption'},
77
+            'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'options'", 'to': "orm['catalogue.AttributeOptionGroup']"}),
78
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
79
+            'option': ('django.db.models.fields.CharField', [], {'max_length': '255'})
80
+        },
81
+        'catalogue.attributeoptiongroup': {
82
+            'Meta': {'object_name': 'AttributeOptionGroup'},
83
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
84
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
85
+        },
86
+        'catalogue.category': {
87
+            'Meta': {'ordering': "['full_name']", 'object_name': 'Category'},
88
+            'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
89
+            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
90
+            'full_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
91
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
92
+            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
93
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
94
+            'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
95
+            'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
96
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255'})
97
+        },
98
+        'catalogue.option': {
99
+            'Meta': {'object_name': 'Option'},
100
+            'code': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}),
101
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
103
+            'type': ('django.db.models.fields.CharField', [], {'default': "'Required'", 'max_length': '128'})
104
+        },
105
+        'catalogue.product': {
106
+            'Meta': {'ordering': "['-date_created']", 'object_name': 'Product'},
107
+            'attributes': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['catalogue.ProductAttribute']", 'through': "orm['catalogue.ProductAttributeValue']", 'symmetrical': 'False'}),
108
+            'categories': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['catalogue.Category']", 'through': "orm['catalogue.ProductCategory']", 'symmetrical': 'False'}),
109
+            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
110
+            'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
111
+            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
112
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
113
+            'is_discountable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
114
+            'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'variants'", 'null': 'True', 'to': "orm['catalogue.Product']"}),
115
+            'product_class': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ProductClass']", 'null': 'True'}),
116
+            'product_options': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['catalogue.Option']", 'symmetrical': 'False', 'blank': 'True'}),
117
+            'rating': ('django.db.models.fields.FloatField', [], {'null': 'True'}),
118
+            'recommended_products': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['catalogue.Product']", 'symmetrical': 'False', 'through': "orm['catalogue.ProductRecommendation']", 'blank': 'True'}),
119
+            'related_products': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'relations'", 'blank': 'True', 'to': "orm['catalogue.Product']"}),
120
+            'score': ('django.db.models.fields.FloatField', [], {'default': '0.0', 'db_index': 'True'}),
121
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255'}),
122
+            'status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}),
123
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
124
+            'upc': ('django.db.models.fields.CharField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'})
125
+        },
126
+        'catalogue.productattribute': {
127
+            'Meta': {'ordering': "['code']", 'object_name': 'ProductAttribute'},
128
+            'code': ('django.db.models.fields.SlugField', [], {'max_length': '128'}),
129
+            'entity_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.AttributeEntityType']", 'null': 'True', 'blank': 'True'}),
130
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
131
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
132
+            'option_group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.AttributeOptionGroup']", 'null': 'True', 'blank': 'True'}),
133
+            'product_class': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attributes'", 'null': 'True', 'to': "orm['catalogue.ProductClass']"}),
134
+            'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
135
+            'type': ('django.db.models.fields.CharField', [], {'default': "'text'", 'max_length': '20'})
136
+        },
137
+        'catalogue.productattributevalue': {
138
+            'Meta': {'object_name': 'ProductAttributeValue'},
139
+            'attribute': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ProductAttribute']"}),
140
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
141
+            'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_values'", 'to': "orm['catalogue.Product']"}),
142
+            'value_boolean': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
143
+            'value_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
144
+            'value_entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.AttributeEntity']", 'null': 'True', 'blank': 'True'}),
145
+            'value_float': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
146
+            'value_integer': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
147
+            'value_option': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.AttributeOption']", 'null': 'True', 'blank': 'True'}),
148
+            'value_richtext': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
149
+            'value_text': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
150
+        },
151
+        'catalogue.productcategory': {
152
+            'Meta': {'ordering': "['-is_canonical']", 'object_name': 'ProductCategory'},
153
+            'category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Category']"}),
154
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
155
+            'is_canonical': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
156
+            'product': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Product']"})
157
+        },
158
+        'catalogue.productclass': {
159
+            'Meta': {'ordering': "['name']", 'object_name': 'ProductClass'},
160
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
161
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
162
+            'options': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['catalogue.Option']", 'symmetrical': 'False', 'blank': 'True'}),
163
+            'requires_shipping': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
164
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}),
165
+            'track_stock': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
166
+        },
167
+        'catalogue.productrecommendation': {
168
+            'Meta': {'object_name': 'ProductRecommendation'},
169
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
170
+            'primary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'primary_recommendations'", 'to': "orm['catalogue.Product']"}),
171
+            'ranking': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}),
172
+            'recommendation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Product']"})
173
+        },
174
+        'contenttypes.contenttype': {
175
+            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
176
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
177
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
178
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
179
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
180
+        },
181
+        'customer.communicationeventtype': {
182
+            'Meta': {'object_name': 'CommunicationEventType'},
183
+            'category': ('django.db.models.fields.CharField', [], {'default': "u'Order related'", 'max_length': '255'}),
184
+            'code': ('django.db.models.fields.SlugField', [], {'max_length': '128'}),
185
+            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
186
+            'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
187
+            'email_body_html_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
188
+            'email_body_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
189
+            'email_subject_template': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
190
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
191
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
192
+            'sms_template': ('django.db.models.fields.CharField', [], {'max_length': '170', 'blank': 'True'})
193
+        },
194
+        'order.billingaddress': {
195
+            'Meta': {'object_name': 'BillingAddress'},
196
+            'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['address.Country']"}),
197
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
198
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
199
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
200
+            'line1': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
201
+            'line2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
202
+            'line3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
203
+            'line4': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
204
+            'postcode': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
205
+            'search_text': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
206
+            'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
207
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'})
208
+        },
209
+        'order.communicationevent': {
210
+            'Meta': {'ordering': "['-date_created']", 'object_name': 'CommunicationEvent'},
211
+            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
212
+            'event_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['customer.CommunicationEventType']"}),
213
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
214
+            'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'communication_events'", 'to': "orm['order.Order']"})
215
+        },
216
+        'order.line': {
217
+            'Meta': {'object_name': 'Line'},
218
+            'est_dispatch_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
219
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
220
+            'line_price_before_discounts_excl_tax': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
221
+            'line_price_before_discounts_incl_tax': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
222
+            'line_price_excl_tax': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
223
+            'line_price_incl_tax': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
224
+            'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'lines'", 'to': "orm['order.Order']"}),
225
+            'partner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'order_lines'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['partner.Partner']"}),
226
+            'partner_line_notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
227
+            'partner_line_reference': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
228
+            'partner_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
229
+            'partner_sku': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
230
+            'product': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Product']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
231
+            'quantity': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
232
+            'status': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
233
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
234
+            'unit_cost_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
235
+            'unit_price_excl_tax': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
236
+            'unit_price_incl_tax': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
237
+            'unit_retail_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
238
+            'upc': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'})
239
+        },
240
+        'order.lineattribute': {
241
+            'Meta': {'object_name': 'LineAttribute'},
242
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
243
+            'line': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attributes'", 'to': "orm['order.Line']"}),
244
+            'option': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'line_attributes'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['catalogue.Option']"}),
245
+            'type': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
246
+            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
247
+        },
248
+        'order.lineprice': {
249
+            'Meta': {'ordering': "('id',)", 'object_name': 'LinePrice'},
250
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
251
+            'line': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'prices'", 'to': "orm['order.Line']"}),
252
+            'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'line_prices'", 'to': "orm['order.Order']"}),
253
+            'price_excl_tax': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
254
+            'price_incl_tax': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
255
+            'quantity': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
256
+            'shipping_excl_tax': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '12', 'decimal_places': '2'}),
257
+            'shipping_incl_tax': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '12', 'decimal_places': '2'})
258
+        },
259
+        'order.order': {
260
+            'Meta': {'ordering': "['-date_placed']", 'object_name': 'Order'},
261
+            'basket_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
262
+            'billing_address': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['order.BillingAddress']", 'null': 'True', 'blank': 'True'}),
263
+            'date_placed': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
264
+            'guest_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
265
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
266
+            'number': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
267
+            'shipping_address': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['order.ShippingAddress']", 'null': 'True', 'blank': 'True'}),
268
+            'shipping_excl_tax': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '12', 'decimal_places': '2'}),
269
+            'shipping_incl_tax': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '12', 'decimal_places': '2'}),
270
+            'shipping_method': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
271
+            'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
272
+            'status': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
273
+            'total_excl_tax': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
274
+            'total_incl_tax': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
275
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'orders'", 'null': 'True', 'to': "orm['auth.User']"})
276
+        },
277
+        'order.orderdiscount': {
278
+            'Meta': {'object_name': 'OrderDiscount'},
279
+            'amount': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '12', 'decimal_places': '2'}),
280
+            'category': ('django.db.models.fields.CharField', [], {'default': "'Basket'", 'max_length': '64'}),
281
+            'frequency': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
282
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
283
+            'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
284
+            'offer_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
285
+            'offer_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'db_index': 'True'}),
286
+            'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'discounts'", 'to': "orm['order.Order']"}),
287
+            'voucher_code': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'db_index': 'True'}),
288
+            'voucher_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
289
+        },
290
+        'order.ordernote': {
291
+            'Meta': {'object_name': 'OrderNote'},
292
+            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
293
+            'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
294
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
295
+            'message': ('django.db.models.fields.TextField', [], {}),
296
+            'note_type': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}),
297
+            'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['order.Order']"}),
298
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'})
299
+        },
300
+        'order.paymentevent': {
301
+            'Meta': {'ordering': "['-date_created']", 'object_name': 'PaymentEvent'},
302
+            'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '2'}),
303
+            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
304
+            'event_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['order.PaymentEventType']"}),
305
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
306
+            'lines': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['order.Line']", 'through': "orm['order.PaymentEventQuantity']", 'symmetrical': 'False'}),
307
+            'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment_events'", 'to': "orm['order.Order']"}),
308
+            'reference': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
309
+            'shipping_event': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment_events'", 'null': 'True', 'to': "orm['order.ShippingEvent']"})
310
+        },
311
+        'order.paymenteventquantity': {
312
+            'Meta': {'object_name': 'PaymentEventQuantity'},
313
+            'event': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'line_quantities'", 'to': "orm['order.PaymentEvent']"}),
314
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
315
+            'line': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment_event_quantities'", 'to': "orm['order.Line']"}),
316
+            'quantity': ('django.db.models.fields.PositiveIntegerField', [], {})
317
+        },
318
+        'order.paymenteventtype': {
319
+            'Meta': {'ordering': "('sequence_number',)", 'object_name': 'PaymentEventType'},
320
+            'code': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}),
321
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
322
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
323
+            'sequence_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
324
+        },
325
+        'order.shippingaddress': {
326
+            'Meta': {'object_name': 'ShippingAddress'},
327
+            'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['address.Country']"}),
328
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
329
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
330
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
331
+            'line1': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
332
+            'line2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
333
+            'line3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
334
+            'line4': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
335
+            'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
336
+            'phone_number': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
337
+            'postcode': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
338
+            'search_text': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
339
+            'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
340
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'})
341
+        },
342
+        'order.shippingevent': {
343
+            'Meta': {'ordering': "['-date_created']", 'object_name': 'ShippingEvent'},
344
+            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
345
+            'event_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['order.ShippingEventType']"}),
346
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
347
+            'lines': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'shipping_events'", 'symmetrical': 'False', 'through': "orm['order.ShippingEventQuantity']", 'to': "orm['order.Line']"}),
348
+            'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
349
+            'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'shipping_events'", 'to': "orm['order.Order']"})
350
+        },
351
+        'order.shippingeventquantity': {
352
+            'Meta': {'object_name': 'ShippingEventQuantity'},
353
+            'event': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'line_quantities'", 'to': "orm['order.ShippingEvent']"}),
354
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
355
+            'line': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'shipping_event_quantities'", 'to': "orm['order.Line']"}),
356
+            'quantity': ('django.db.models.fields.PositiveIntegerField', [], {})
357
+        },
358
+        'order.shippingeventtype': {
359
+            'Meta': {'ordering': "('sequence_number',)", 'object_name': 'ShippingEventType'},
360
+            'code': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}),
361
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
362
+            'is_required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
363
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
364
+            'sequence_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
365
+        },
366
+        'partner.partner': {
367
+            'Meta': {'object_name': 'Partner'},
368
+            'code': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}),
369
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
370
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
371
+            'users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'partners'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['auth.User']"})
372
+        },
373
+        'sites.site': {
374
+            'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
375
+            'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
376
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
377
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
378
+        }
379
+    }
380
+
381
+    complete_apps = ['order']

読み込み中…
キャンセル
保存