Merge pull request #1033 from ae-utbm/fixed

Fix sales display
This commit is contained in:
thomas girod 2025-02-25 14:41:14 +01:00 committed by GitHub
commit be87af5e06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -847,11 +847,10 @@ class Selling(models.Model):
verbose_name = _("selling")
def __str__(self):
return "Selling: %d x %s (%f) for %s" % (
self.quantity,
self.label,
self.quantity * self.unit_price,
self.customer.user.get_display_name(),
return (
f"Selling: {self.quantity} x {self.label} "
f"({self.quantity * self.unit_price} €) "
f"for {self.customer.user.get_display_name()}"
)
def save(self, *args, allow_negative=False, **kwargs):