mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Improve product display
This commit is contained in:
parent
7fdcb0c815
commit
63217b2ead
@ -75,7 +75,7 @@ class ProductsLookup(RightManagedLookupChannel):
|
|||||||
self.model.objects.filter(code__icontains=q)).filter(archived=False)[:50]
|
self.model.objects.filter(code__icontains=q)).filter(archived=False)[:50]
|
||||||
|
|
||||||
def format_item_display(self, item):
|
def format_item_display(self, item):
|
||||||
return item.name
|
return "%s (%s)" % (item.name, item.code)
|
||||||
|
|
||||||
@register('club_accounts')
|
@register('club_accounts')
|
||||||
class ClubAccountLookup(RightManagedLookupChannel):
|
class ClubAccountLookup(RightManagedLookupChannel):
|
||||||
|
@ -113,7 +113,7 @@ class Product(models.Model):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return "%s (%s)" % (self.name, self.code)
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse('counter:product_list')
|
return reverse('counter:product_list')
|
||||||
|
Loading…
Reference in New Issue
Block a user