8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-07-04 13:14:06 +00:00

Merge branch 'fix_switchs_display' into 'dev'

Affichage de la réference commerciale par default

See merge request federez/re2o!339
This commit is contained in:
chirac 2018-10-15 19:20:06 +02:00
commit 5a86826979

View file

@ -411,7 +411,10 @@ class ModelSwitch(AclMixin, RevMixin, models.Model):
verbose_name_plural = _("switch models")
def __str__(self):
return str(self.constructor) + ' ' + self.reference
if self.commercial_name:
return str(self.constructor) + ' ' + str(self.commercial_name)
else:
return str(self.constructor) + ' ' + self.reference
class ConstructorSwitch(AclMixin, RevMixin, models.Model):