diff --git a/core/management/commands/populate.py b/core/management/commands/populate.py index dfc9cfc1..797c2a33 100644 --- a/core/management/commands/populate.py +++ b/core/management/commands/populate.py @@ -140,6 +140,7 @@ Cette page vise à documenter la syntaxe *Markdown* utilisée sur le site. # Counters Customer(user=skia, account_id="6568j", amount=0).save() + Customer(user=r, account_id="4000", amount=0).save() p = ProductType(name="Bières bouteilles") p.save() barb = Product(name="Barbar", code="BARB", product_type=p, purchase_price="1.50", selling_price="1.7", diff --git a/core/models.py b/core/models.py index 5336a3e1..acfb333f 100644 --- a/core/models.py +++ b/core/models.py @@ -269,6 +269,9 @@ class AnonymousUser(AuthAnonymousUser): return True return False + def get_display_name(self): + return _("Visitor") + class LockError(Exception): """There was a lock error on the object""" pass diff --git a/counter/templates/counter/counter_click.jinja b/counter/templates/counter/counter_click.jinja index 54889063..58b75187 100644 --- a/counter/templates/counter/counter_click.jinja +++ b/counter/templates/counter/counter_click.jinja @@ -22,7 +22,7 @@

Club: {{ counter.club }}

-

Customer: {{ customer }}

+

Customer: {{ customer.user.get_display_name() }}, {{ customer.amount }} €

Basket: