Improve product display

This commit is contained in:
Skia 2016-10-04 16:40:43 +02:00
parent 7fdcb0c815
commit 63217b2ead
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ class ProductsLookup(RightManagedLookupChannel):
self.model.objects.filter(code__icontains=q)).filter(archived=False)[:50]
def format_item_display(self, item):
return item.name
return "%s (%s)" % (item.name, item.code)
@register('club_accounts')
class ClubAccountLookup(RightManagedLookupChannel):

View File

@ -113,7 +113,7 @@ class Product(models.Model):
return False
def __str__(self):
return self.name
return "%s (%s)" % (self.name, self.code)
def get_absolute_url(self):
return reverse('counter:product_list')