fix Selling.__str__

This commit is contained in:
imperosol 2025-02-25 12:59:49 +01:00
parent c272cad2ea
commit 6af03240a1

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):