mirror of
https://github.com/ae-utbm/sith.git
synced 2025-02-27 09:57:09 +00:00
fix Selling.__str__
This commit is contained in:
parent
c272cad2ea
commit
6af03240a1
@ -847,11 +847,10 @@ class Selling(models.Model):
|
|||||||
verbose_name = _("selling")
|
verbose_name = _("selling")
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Selling: %d x %s (%f) for %s" % (
|
return (
|
||||||
self.quantity,
|
f"Selling: {self.quantity} x {self.label} "
|
||||||
self.label,
|
f"({self.quantity * self.unit_price} €) "
|
||||||
self.quantity * self.unit_price,
|
f"for {self.customer.user.get_display_name()}"
|
||||||
self.customer.user.get_display_name(),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def save(self, *args, allow_negative=False, **kwargs):
|
def save(self, *args, allow_negative=False, **kwargs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user