Explorar el Código

Fixed admin bug with payment models

master
David Winterbottom hace 14 años
padre
commit
86d3eae8ea

+ 0
- 1
oscar/apps/address/abstract_models.py Ver fichero

@@ -52,7 +52,6 @@ class AbstractAddress(models.Model):
52 52
         """
53 53
         Clean up fields
54 54
         """
55
-        self.first_name = self.first_name.strip()
56 55
         for field in ['first_name', 'last_name', 'line1', 'line2', 'line3', 'line4', 'postcode']:
57 56
             if self.__dict__[field]:
58 57
                self.__dict__[field] = self.__dict__[field].strip()

+ 2
- 1
oscar/apps/payment/admin.py Ver fichero

@@ -4,7 +4,8 @@ from oscar.core.loading import import_module
4 4
 models = import_module('payment.models', ['Source', 'Transaction', 'SourceType'])
5 5
 
6 6
 class SourceAdmin(admin.ModelAdmin):
7
-    list_display = ('order', 'type', 'amount_allocated', 'amount_debited', 'balance', 'reference')
7
+    list_display = ('order', 'source_type', 'amount_allocated', 'amount_debited', 'balance', 'reference')
8
+
8 9
 
9 10
 admin.site.register(models.Source, SourceAdmin)
10 11
 admin.site.register(models.SourceType)

+ 4
- 0
oscar/apps/payment/models.py Ver fichero

@@ -1,14 +1,18 @@
1 1
 from oscar.apps.payment.abstract_models import *
2 2
 
3
+
3 4
 class Source(AbstractSource):
4 5
     pass
5 6
 
7
+
6 8
 class SourceType(AbstractSourceType):
7 9
     pass
8 10
 
11
+
9 12
 class Transaction(AbstractTransaction):
10 13
     pass
11 14
 
15
+
12 16
 class Bankcard(AbstractBankcard):
13 17
     pass
14 18
 

Loading…
Cancelar
Guardar